Datasheet
UARTx_Data_Ready
UARTx_Read
537
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
char UARTx_Data_Ready();
Returns Function returns 1 if data is ready or 0 if there is no data.
Description Use the function to test if data in receive buffer is ready for reading.
Requires
UART HW module must be initialized and communication established before
using this function. See UARTx_Init.
Example
// If data is ready, read it:
if (UART1_Data_Ready() == 1) {
receive = UART1_Read();
}
Prototype
char UARTx_Read();
Returns Returns the received byte.
Description
Function receives a byte via UART. Use the function UARTx_Data_Ready to
test if data is ready first.
Requires
UART HW module must be initialized and communication established before
using this function. See UARTx_Init.
Example
// If data is ready, read it:
if (UART1_Data_Ready() == 1) {
receive = UART1_Read();
}