10.07.2015 Views

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

CF2 API Reference (PDF) - Persistor Instruments Inc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>TUOpen – 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 timeoutPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.71 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!