www.beck-ipc.com

@CHIP-RTOS C Library V2.06 - Fossil API


fossil_get_bytes_in_uart

Get number of bytes currently in UART hardware transmit buffers.

int fossil_get_bytes_in_uart ( int port );

SC1x Parameters

port
Port specifier:
    FOSSIL_EXT = 0 for EXT port
    FOSSIL_COM = 1 for COM port

SC1x3 Parameters

port
Port specifier:
    FOSSIL_EXT = 0 for EXT port
    FOSSIL_COM = 1 for COM port
    FOSSIL_SER2 = 2 for SER2 port
    FOSSIL_SER3 = 3 for SER3 port

Return Value

Number of transmitter bytes in the UART, pending output
-1 if UART transmitter is disabled (since SC1x version V1.20 and SC1x3 version V1.05)

Comments

Returns the number of bytes which are currently in the UART hardware transmit buffers.

With this function you can check how many bytes are currently stored at the internal UART transmit registers.   This may be necessary to know if your communication pauses because of a handshake problem.   If you want to know, how many bytes are stored at the fossil driver software transmit queue, you can use fossil_get_driver_info function.   However, fossil_get_driver_info does not check the UART transmit hardware buffers.

See Also

RTOS API

This library function invokes a RTOS software interrupt. Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3
    V1.00V1.00V1.00V0.90

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document