User manual

Table Of Contents
594
mikoC PRO for PIC32
MikroElektronika
UARTx_Read
Prototype
unsigned UARTx_Read();
Description The function receives a byte via UART. Use the UARTx_Data_Ready function to test if data is ready
rst.
Parameters None.
Returns Received byte.
Requires Routine requires at least one UART module.
Used UART module must be initialized before using this routine. See UARTx_Init and UARTx_Init_
Advanced routines.
Example
unsigned receive;
...
// read data if ready
if (UART1_Data_Ready())
receive = UART1_Read();
Notes UART library routines require you to specify the module you want to use. To select the desired UART
module, simply change the letter x in the routine prototype for a number from 1 to 6.
Number of UART modules per MCU differs from chip to chip. Please, read the appropriate datasheet
before utilizing this library.