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>kbhit -- Detect the availability of a character on the UARTDescription:Prototype:Returns:Notes:This function returns nonzero if there is a character available to receive on the main serial port.It's behavior depends also on the buffering mode currently in effect. In interrupt-driven mode,kbhit() should return the number of characters available. In polled mode, kbhit() will returneither 0 or non zero if there is a character available.short kbhit(void);Returns TRUE if there is a character available, FALSE if there is not. (see notes)kbhit() is a macro to SCIRxQueuedCount()See STDIO Warning at end of this sectionputch -- Writes a byte out the main UARTDescription:Prototype:Inputs:Notes:This command takes the LSB of data and puts it in the transmit queue of the main UART. If theSCI is in polled mode, putch() will wait for the transmit queue to be empty and then write theLSB of data to the main UART. The MSB of data is always ignored.void putch(ushort data);data is a ushort, the LSB of which is the character you wish to transmit.putch(c) is a macro to SCITxPutChar(c)See STDIO Warning at end of this sectionputflush -- Wait for all transmission to complete.Description:Prototype:Notes:This will wait for the transmit buffer to be empty and then return. Behavior is the sameregardless of buffering mode, however timing may vary.void putflush (void);putflush() is a macro to SCITxWaitCompletion()See STDIO Warning at end of this sectionputstr -- Write a NULL terminated string to the main UARTDescription:Prototype:Inputs:Notes:Writes the NULL terminated string pointed to by str to the transmit queue of the main UART.putstr() will not append any characters to the end of any string passed to it, however it willreplace any "newline" characters (/n) already in the string with CRLF sequences before insertingit into the buffer.void putstr (const char *str);str is a pointer to a NULL terminated string.putstr(s) is a macro to SCITxPutStr(s)See STDIO Warning at end of this sectionPERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.18 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!