CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API ReferenceTUClose – Close the specified port and release its memoryDescription:Prototype:Inputs:Returns:wordvoid TUClose(TUPort *tup);*tup is a pointer to the portNothingNotes:TUGetDefaultParams – Return the default TPU UART open parametersDescription:Prototype:Inputs:Returns:wordTUChParams *TUGetDefaultParams(void);NoneA pointer to a TUChParams struct containing the TPU UART parametersNotes:typedef struct{short bits;short parity;short autobaud;long baud;short rxpri;short txpri;short rxqsz;short txqsz;short tpfbsz;} TUChParams;// data bits exclusive of start, stop, parity// parity: 'o','O','e','E', all else is none// automatically adjust baud when clock changes// baud rate// receive channel TPUPriority// transmit channel TPUPriority// receive channel queue buffer size// transmit channel queue buffer size// transmit channel printf buffer sizeTUInit – Initialize the TPU UART moduleDescription:Prototype:Inputs:Returns:Call this at the start of your program before opening TPU UART ports.void TUInit(Callocf *callocf, Freef *freef);References to calloc and free functions used so that the TPU UART software can manage thememory used by the port.NothingPERSISTORInstruments Inc.70 of 84CF2 API Reference7/19/2005
CF2 API ReferenceTUOpen – Open a TPU UART port for serial communicationsDescription:Prototype:Inputs:Returns:Specify separate valid TPU channels (1 to 15) for receive and transmit. Specify -1 for rxch for atransmit only port, -1 for txch for receive only.TUPort *TUOpen(short rxch, short txch, long baud, TUChParams *tp);rxch is the receive TPU Channel Numbertxch is the transmit TPU Channel Numberbaud is the desired baud*tp is a pointer to the TUChParams containing the channel parametersA pointer to the port or NULL if an error occursNotes:TURelease – Close all ports then release all memory and resources allocated to TPU UARTsDescription:Prototype:Inputs:Returns:This is done automatically when your program quits. You use it if you need to dynamicallyreconfigure your systems TPUs.void TURelease(void);NoneNothingTURxFlush – Delete any data in the receive queueDescription:Prototype:Inputs:Returns:Delete any data in the receive queuevoid TURxFlush(TUPort *tup);*tup is a pointer to the portNothingTURxGetByte – Wait for, and return the next wordDescription:Prototype:Inputs:Returns:Wait for, and return the next wordshort TURxGetByte(TUPort *tup, bool block);*tup is a pointer to the portblock is TRUE if you want to wait for a character and FALSE if you do not wish to waitThe characterTURxGetByteWithTimeout – Return next wordDescription:Prototype:Inputs:Returns:Return next wordshort TURxGetByteWithTimeout(TUPort *tup, short millisecs);*tup is a pointer to the portmillisecs is the timeout value in millisecondsReturns the next word or -1 on timeoutPERSISTORInstruments Inc.71 of 84CF2 API Reference7/19/2005
- 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 and 30: CF2 API ReferencePin I/O Drivers, F
- Page 31 and 32: CF2 API ReferencePinIO -- Make an I
- 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: CF2 API ReferenceTPU UartSummary of
- 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
- Page 81 and 82: CF2 API ReferenceVEEStoreFloat -- S
- Page 83 and 84: CF2 API ReferencePinBus, 30PinClear
<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>TUClose – Close the specified port and release its memoryDescription:Prototype:Inputs:Returns:wordvoid TUClose(TUPort *tup);*tup is a pointer to the portNothingNotes:TUGetDefaultParams – Return the default TPU UART open parametersDescription:Prototype:Inputs:Returns:wordTUChParams *TUGetDefaultParams(void);NoneA pointer to a TUChParams struct containing the TPU UART parametersNotes:typedef struct{short bits;short parity;short autobaud;long baud;short rxpri;short txpri;short rxqsz;short txqsz;short tpfbsz;} TUChParams;// data bits exclusive of start, stop, parity// parity: 'o','O','e','E', all else is none// automatically adjust baud when clock changes// baud rate// receive channel TPUPriority// transmit channel TPUPriority// receive channel queue buffer size// transmit channel queue buffer size// transmit channel printf buffer sizeTUInit – Initialize the TPU UART moduleDescription:Prototype:Inputs:Returns:Call this at the start of your program before opening TPU UART ports.void TUInit(Callocf *callocf, Freef *freef);<strong>Reference</strong>s to calloc and free functions used so that the TPU UART software can manage thememory used by the port.NothingPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.70 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005