CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc

persistor.com
from persistor.com More from this publisher
10.07.2015 Views

CF2 API ReferencePIOSet -- Configure I/O pin as output and set highDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving high. The pin argument can bespecified as numerical value between 1 and 50 corresponding to the CF2 pin out on connector C.short PIOSet(short pin);pin is the pin number to act onReturns the current level (after setting) or -1 if there's an errorPIOTestAssertClear -- Return true if I/O pin is currently an output asserting lowDescription:Prototype:Inputs:Returns:This function tests to see if the specified pin is configured as an output and is asserted low.short PIOTestAssertClear (short pin);pin is the pin number to test.Returns nonzero if the pin is set low, and zero if the pin is set high or is not an I/O output.PIOTestAssertSet -- Return true if I/O pin is currently an output asserting highDescription:Prototype:Inputs:Returns:Return TRUE if I/O pin is currently an output asserting highshort PIOTestAssertSet (short pin);pin is the pin number to test.Returns nonzero if the pin is set high, and zero if the pin is set low or is not an I/O output.PIOToggle -- Configure I/O pin as output and toggle current levelDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving at the opposite of the currentlevel. The pin argument can be specified as numerical value between 1 and 50 corresponding tothe CF2 pin out on connector C.short PIOToggle(short pin);pin is the pin number to act onReturns the current level (after toggling) or -1 if there's an errorPIOWrite -- Configure I/O pin as output and write levelDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving at the specified level. The pinargument can be specified as numerical value between 1 and 50 corresponding to the CF2 pinout on connector C.short PIOWrite(short pin, short value);pin is the pin number to act onvalue is the value (0 or 1) that you wish to write to the pin.Returns the current level (after setting) or -1 if there's an errorPERSISTORInstruments Inc.34 of 84CF2 API Reference7/19/2005

CF2 API ReferencePing-Pong Buffer FunctionsSummary of Ping-Pong Buffer FunctionsPPBCheckRdAvailPPBCheckWrFreePPBClosePPBFlushPPBGetMemBufPPBOpenPPBPutBytePPBPutWordPPBReadPPBWriteReturn the number of bytes waiting to be readReturn the free space left before a wrapClose a ping-pong buffer (does not automatically flush)Flush a ping-pong buffer and force a ping-pong flipReturn the read buffer and optionally zero the sizeOpen and initialize a ping-pong bufferWrite 8-bit byte into the ping-pong bufferWrite 16-bit word into the ping-pong bufferRead data from the ping-pong bufferWrite data into the ping-pong bufferPPBCheckRdAvail -- Return the number of bytes waiting to be readDescription:Prototype:Inputs:Returns:Return the number of bytes waiting to be readlong PPBCheckRdAvail(void *ppb);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.Returns the count of available bytes in the read bufferPPBCheckWrFree -- Return the free space left before a wrapDescription:Prototype:Inputs:Returns:Return the free space left before a wraplong PPBCheckWrFree(void *ppb);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.Returns the number of bytes that can be written before the buffer ping-pongsPPBClose -- Close a ping-pong buffer (does not automatically flush)Description:Prototype:Inputs:Returns:Close a ping-pong buffer (does not automatically flush)void PPBClose(void *ppb);ppb is the generic pointer returned by PPBOpen and used internally to manage the buffers.Returns nothingPERSISTORInstruments Inc.35 of 84CF2 API Reference7/19/2005

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>PIOSet -- Configure I/O pin as output and set highDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving high. The pin argument can bespecified as numerical value between 1 and 50 corresponding to the <strong>CF2</strong> pin out on connector C.short PIOSet(short pin);pin is the pin number to act onReturns the current level (after setting) or -1 if there's an errorPIOTestAssertClear -- Return true if I/O pin is currently an output asserting lowDescription:Prototype:Inputs:Returns:This function tests to see if the specified pin is configured as an output and is asserted low.short PIOTestAssertClear (short pin);pin is the pin number to test.Returns nonzero if the pin is set low, and zero if the pin is set high or is not an I/O output.PIOTestAssertSet -- Return true if I/O pin is currently an output asserting highDescription:Prototype:Inputs:Returns:Return TRUE if I/O pin is currently an output asserting highshort PIOTestAssertSet (short pin);pin is the pin number to test.Returns nonzero if the pin is set high, and zero if the pin is set low or is not an I/O output.PIOToggle -- Configure I/O pin as output and toggle current levelDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving at the opposite of the currentlevel. The pin argument can be specified as numerical value between 1 and 50 corresponding tothe <strong>CF2</strong> pin out on connector C.short PIOToggle(short pin);pin is the pin number to act onReturns the current level (after toggling) or -1 if there's an errorPIOWrite -- Configure I/O pin as output and write levelDescription:Prototype:Inputs:Returns:Configures an individual bit of an I/O port as an output driving at the specified level. The pinargument can be specified as numerical value between 1 and 50 corresponding to the <strong>CF2</strong> pinout on connector C.short PIOWrite(short pin, short value);pin is the pin number to act onvalue is the value (0 or 1) that you wish to write to the pin.Returns the current level (after setting) or -1 if there's an errorPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.34 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!