Modules | |
ATmega On-Chip UART Devices | |
UART Device Structures. Applications must pass these structure to NutRegisterDevice() to bind the serial port device driver to the Nut/OS kernel. Having done that, the application may call NutDeviceOpen() with the name of this driver to initialize the interface. | |
Data Structures | |
struct | _UARTDCB |
UART device control block structure. More... | |
struct | _UARTDCB |
UART device control block structure. More... | |
Typedefs | |
typedef _UARTDCB | UARTDCB |
Functions | |
int | UartAvrGetRaw (u_char *cp) |
Get raw byte from the UART receiver register. | |
int | UartAvrPutRaw (u_char ch) |
Put raw byte to the UART transmit register. | |
int | UartAvrInput (NUTDEVICE *dev) |
Wait for input. | |
int | UartAvrOutput (NUTDEVICE *dev) |
Initiate output. | |
int | UartAvrFlush (NUTDEVICE *dev) |
Wait for output buffer empty. | |
int | UartAvrIOCtl (NUTDEVICE *dev, int req, void *conf) |
Perform on-chip UART control functions. | |
int | UartAvrInit (NUTDEVICE *dev) |
Initialize on chip uart device. |
This stream device driver writes data to and reads data from the UART on the ATmega 103/128 chip. Both, input and output data is buffered and send resp. transmitted by interrupt routines.
|
UART device control block type. |
|
Wait for output buffer empty.
If the output buffer contains any data, the calling thread is suspended until all data has been transmitted.
|
|
Get raw byte from the UART receiver register.
|
|
Initialize on chip uart device.
Prepares the device for subsequent reading or writing. Enables UART transmitter and receiver interrupts. Applications should not use this function, but call NutDeviceOpen().
|
|
Wait for input.
This function checks the input buffer for any data. If the buffer is empty, the calling thread will be blocked until at least one new character is received or a timeout occurs.
|
|
Perform on-chip UART control functions.
|
|
Initiate output.
This function checks the output buffer for any data. If the buffer contains at least one character, the transmitter is started, if not already running. The function returns immediately, without waiting for the character being completely transmitted. Any remaining characters in the output buffer are transmitted in the background.
|
|
Put raw byte to the UART transmit register.
|