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 ReferencePIN macros vs. PIO functionsPIN functionsInline assembly macrosfasterrequire compile time literalargumentsdo not verify pin conditionsPIO functionsStandard C functionsslowercan pass variablesdo verify pin conditionsPinBus Make pin perform function PIOBusFunct Make pin perform functionPinTestIsItBus Is pin performing its function?PIOTestAssertClearPIOTestAssertSetReturn true if pin is a low outputReturn true if pin is a high outputPinIOMake pin perform I/O functionPinRead Configure as input and read PIORead Configure as input and readPinSet Configure as output and set high PIOSet Configure as output and set highPinWrite Configure as output low or high PIOWrite Configure as output as low or highPinClear Configure as output and set low PIOClear Configure as output and set lowPinMirror Read and output level read PIOMirrorPIOMirrorListRead and output level readRead a list of pins and output level readPinToggle Configure as output and toggle PIOToggle Configure as output and togglePinBus -- Make an I/O pin perform its bus function (varies)Description:Prototype:Inputs:Notes:Configures one of the I/O ports to act as its bus function instead of as an I/O pin.void PinBus(short pin);pin is the pin to act on.1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinClear -- Configure I/O pin as output and set lowDescription:Prototype:Inputs:Notes:Directly clears one of the I/O ports.void PinClear(PinID pin);pin is the pin to clear1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PERSISTORInstruments Inc.30 of 84CF2 API Reference7/19/2005

CF2 API ReferencePinIO -- Make an I/O pin perform its digital I/O functionDescription: Configure one of the I/O ports to act as an I/O pin.Prototype:Inputs:Notes:void PinIO(short pin);pin is the pin number to act on1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinMirror -- Read an I/O pin, then configure as an output at the level readDescription: Configures an individual bit of an I/O port as an input and reads its current state, thenit reconfigures the line to an output at the level previously read. This is particularlyuseful for eliminating floating inputs which can cause the system to waste power.Prototype:Inputs:Notes:void PinMirror(short pin);pin is the pin number to act on1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinRead -- Configure I/O pin as input and read levelDescription: Reads the bit setting of one of the I/O ports.Prototype:Inputs:Returns:Notes:short PinRead(short pin);Pin is the pin number you wish to readThe current level if the port pin has previously been defined as an input1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinSet -- Configure I/O pin as output and set highDescription: Directly sets one of the I/O ports.Prototype:Inputs:Notes:void PinSet(PinID pin);pin is the pin to set.1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PERSISTORInstruments Inc.31 of 84CF2 API Reference7/19/2005

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>PinIO -- Make an I/O pin perform its digital I/O functionDescription: Configure one of the I/O ports to act as an I/O pin.Prototype:Inputs:Notes:void PinIO(short pin);pin is the pin number to act on1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinMirror -- Read an I/O pin, then configure as an output at the level readDescription: Configures an individual bit of an I/O port as an input and reads its current state, thenit reconfigures the line to an output at the level previously read. This is particularlyuseful for eliminating floating inputs which can cause the system to waste power.Prototype:Inputs:Notes:void PinMirror(short pin);pin is the pin number to act on1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinRead -- Configure I/O pin as input and read levelDescription: Reads the bit setting of one of the I/O ports.Prototype:Inputs:Returns:Notes:short PinRead(short pin);Pin is the pin number you wish to readThe current level if the port pin has previously been defined as an input1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PinSet -- Configure I/O pin as output and set highDescription: Directly sets one of the I/O ports.Prototype:Inputs:Notes:void PinSet(PinID pin);pin is the pin to set.1) All arguments to the macro functions must be compile-time literals2) Pin must be in Pin I/O mode or the operation may fail.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.31 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!