CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc
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
- Page 1 and 2: PERSISTOR ® CF2API ReferenceCopyri
- Page 3 and 4: CF2 API ReferenceATA Device Drivers
- Page 5 and 6: CF2 API ReferenceBigIDEA IDE Driver
- Page 7 and 8: CF2 API ReferenceBIOSVersionCheck -
- Page 9 and 10: CF2 API ReferenceCheckSum32 -- Upda
- Page 11 and 12: CF2 API ReferenceChip Select Wrappe
- Page 13 and 14: CF2 API ReferenceCompactFlash Low L
- Page 15 and 16: CF2 API ReferenceBelow are macros d
- Page 17 and 18: CF2 API ReferenceCIOprintf - Simple
- Page 19 and 20: CF2 API Referenceuprintf -- A clone
- Page 21 and 22: CF2 API ReferenceDIRMatchName -- Re
- Page 23 and 24: CF2 API ReferenceLED Signal Functio
- Page 25 and 26: CF2 API ReferencePeriodic Interrupt
- Page 27 and 28: CF2 API ReferencePicoDOS Initializa
- Page 29: CF2 API ReferencePin I/O Drivers, F
- Page 33 and 34: CF2 API ReferencePIOClear -- Config
- Page 35 and 36: CF2 API ReferencePing-Pong Buffer F
- Page 37 and 38: CF2 API ReferencePPBPutWord -- Writ
- Page 39 and 40: CF2 API ReferenceQSMRun - Start the
- Page 41 and 42: CF2 API ReferenceQuery/Reply Functi
- Page 43 and 44: CF2 API ReferenceQRdouble -- Query/
- Page 45 and 46: CF2 API ReferenceQueued PicoBUS (QS
- Page 47 and 48: CF2 API ReferenceQPBSetup -- Set up
- Page 49 and 50: CF2 API ReferenceReal Time Clock Dr
- Page 51 and 52: CF2 API ReferenceRTCtime -- ANSI st
- Page 53 and 54: CF2 API ReferenceSTDIO WarningThe A
- Page 55 and 56: CF2 API ReferenceSCIRxFlush -- Dele
- Page 57 and 58: CF2 API ReferenceSCIRxTxIdle -- Ret
- Page 59 and 60: CF2 API ReferenceSCITxWaitCompletio
- Page 61 and 62: CF2 API ReferenceTable Driven Comma
- Page 63 and 64: CF2 API ReferenceCmdIsNumber- Is Co
- Page 65 and 66: CF2 API ReferenceTime Processing Un
- Page 67 and 68: CF2 API ReferencePrototype:Inputs:N
- Page 69 and 70: CF2 API ReferenceTPU UartSummary of
- Page 71 and 72: CF2 API ReferenceTUOpen - Open a TP
- Page 73 and 74: CF2 API ReferenceTUTxFlush - Delete
- Page 75 and 76: CF2 API ReferenceUtility Functionse
- Page 77 and 78: CF2 API Referencesscantime -- scan
- Page 79 and 80: CF2 API ReferenceVEEDelete -- Delet
<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