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>SCIRxFlush -- Delete any data in the receive queueDescription:Prototype:SCIRxFlush simply purges the receive queue and throws away any data contained therein.void SCIRxFlush(void)SCIRxGetByte -- Return the next word, wait if block is trueDescription:Prototype:Inputs:Returns:Notes:Retrieves one byte from the main UART.ushort SCIRxGetByte(bool block);block - a Boolean, TRUE if the call should wait until a byte has been received to returnReturns a short, the LSB of which contains the data byte and the MSB may contain error orstatus bits as described Error Codes table above.If block is TRUE and no characters are available, the function will wait until a character isavailable before returning. If block is FALSE, and there are no characters are available it willreturn the RxD_NO_DATA word. If a byte was received, the function will return that byte in theLSB of the short returned. The MSB will contain error codes if applicable.SCIRxGetChar -- Wait for, and return the next wordDescription:Prototype:Returns:Notes:This command waits for and returns the next byte from the UART. In the high byte of the shortreturned are error codes, if applicable.short SCIRxGetChar(void);Same as SCIRxGetByte(true).See Error Codes.SCIRxGetCharWithTimeout -- Return next byte from receive queue with timeoutDescription:Prototype:Inputs:Returns:Notes:This command waits up to millisecs ms for the next character to arrive on the main UART.short SCIRxGetCharWithTimeout(short millisecs);millisecs - the number of milliseconds to wait for a character before returning an error.A short, the LSB of which contains the character gotten, or which equals -1 if the function timesout. In the high byte of the short returned are error codes, if applicable.See Error Codes.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.55 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!