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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>SCITxPutByte -- Transmit byte, wait if block is trueDescription:Prototype:Inputs:Returns:Notes:Transmits one byte out the main UART. If block is TRUE and the transmit buffer is full, thefunction will wait until it is able to enqueue the byte before returning. If block is FALSE, and thefunction cannot enqueue the byte it will return FALSE without enqueuing. If the byte wasenqueued or transmitted, the function will return TRUE.bool SCITxPutByte(ushort data, bool block)data - a short, the LSB of which should contain the byte you wish to send.block - a Boolean, TRUE if the call should wait until byte has been sent to returnReturns TRUE if byte was transmitted or FALSE if block was set to FALSE and the byte could notbe transmitted or enqueued (depending on buffering mode) immediately.See Error Codes.SCITxPutChar -- Transmit byteDescription:Prototype:Inputs:This function takes the LSB of data and puts it in the transmit queue of the main UART. If theSCI is in polled mode, SCITxPutChar() will wait for the transmit queue to be empty and thenwrite the LSB of data to the main UART. The MSB of data is always ignored.void SCITxPutChar(ushort data);data is a ushort, the LSB of which is the character you wish to transmit.SCITxQueuedCount -- Return the number of words in the transmit queueDescription:Prototype:Returns:This function allows you to find out how many characters are waiting in the transmit queue.short SCITxQueuedCount(void);In polled buffering mode this function will always return either 1 or 0 depending on theexistence of a character waiting in the UART transmit register. In interrupt-driven bufferingmode, this function returns the number of characters waiting in the transmit queue, up to themaximum, 512.SCITxSetBuffered -- Select buffered (true) or non-buffered transmitDescription:Prototype:Inputs:Notes:This function allows you to change the buffering scheme for the transmit line of the main UART.void SCITxSetBuffered(bool buffered);buffered - a Boolean used to specify the buffering mode desired. TRUE selects interrupt-drivenbuffering mode and FALSE selects polled mode or non-buffered mode.By specifying interrupt driven buffering mode, the <strong>CF2</strong>'s internal BIOS buffering scheme isactivated providing an transparent transmit buffer of 512 characters. In polled buffering modethe transmit queue still "exists" but has a size of one character reflecting the fact that only theinternal UART registers are being used for buffering.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.58 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!