Collaboration diagram for UART Device:
![]() |
This device driver writes data to and reads data from the UART on the ATmega128/103 chip. Both, input and output data is buffered and send resp. transmitted by interrupt routines.
Not all ioctl() function are fully implemented. New applications should use the USART device driver.
Data Structures | |
struct | _UARTDCB |
UART device control block structure. More... | |
struct | _UARTDCB |
UART device control block structure. More... | |
Defines | |
#define | UART_MF_RTSSENSE |
#define | UART_MF_CTSCONTROL |
#define | UART_MF_DTRSENSE |
#define | UART_MF_DSRCONTROL |
#define | UART_MF_DCDCONTROL |
#define | UART_MF_RTSCONTROL |
#define | UART_MF_CTSSENSE |
#define | UART_MF_DTRCONTROL |
#define | UART_MF_DSRSENSE |
#define | UART_MF_DCDSENSE |
#define | UART_MF_SENSEMASK |
#define | UART_MF_CONTROLMASK |
#define | UART_MF_XONXOFF |
#define | UART_MF_LOCALECHO |
#define | UART_MF_COOKEDMODE |
#define | UART_MF_NOBUFFER |
#define | UART_MF_LINEBUFFER |
#define | UART_MF_BUFFERMASK |
#define | UART_MF_RAWMODE |
#define | UART_SF_RTSOFF |
#define | UART_SF_CTSOFF |
#define | UART_SF_DTROFF |
#define | UART_SF_DSROFF |
#define | UART_SF_DCDOFF |
#define | HDLC_SF_FLUSH |
#define | HDLC_SF_ESCAPED |
#define | UART_SF_TXDISABLED |
#define | UART_SF_RXDISABLED |
#define | UART_HS_DCERTSCTS |
#define | UART_HS_DCEFULL |
#define | UART_HS_DTERTSCTS |
#define | UART_HS_DTEFULL |
#define | UART_HS_XONXOFF |
Typedefs | |
typedef _UARTDCB | UARTDCB |
Functions | |
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. | |
int | UartAvrRead (NUTFILE *fp, void *buffer, int size) |
Read from device. | |
int | UartAvrPut (NUTDEVICE *dev, CONST void *buffer, int len, int pflg) |
Write to device. | |
int | UartAvrWrite (NUTFILE *fp, CONST void *buffer, int len) |
int | UartAvrWrite_P (NUTFILE *fp, PGM_P buffer, int len) |
NUTFILE * | UartAvrOpen (NUTDEVICE *dev, CONST char *name, int mode, int acc) |
Open a device or file. | |
int | UartAvrClose (NUTFILE *fp) |
Close a device or file. | |
long | UartAvrSize (NUTFILE *fp) |
Request file size. | |
Variables | |
NUTDEVICE | devUart0 |
UART 0 Device information structure. | |
NUTDEVICE | devUart1 |
UART 1 Device information structure. |
|
Next character escaped. |
|
Waiting for next HDLC flag. |
|
Full DCE handshake. |
|
RTS/CTS DCE handshake. |
|
Full DTE handshake. |
|
RTS/CTS DTE handshake. |
|
Software handshake. |
|
Masks buffering mode flags. |
|
Handshake control mask. |
|
Should be used in stream, not device. |
|
DCE output. |
|
DTE input. |
|
DCE output. |
|
DTE input. |
|
DCE output. |
|
DTE input. |
|
DTE output. |
|
DCE input. |
|
Line buffered. |
|
Should be used in stream, not device. |
|
No buffering. |
|
Send data as raw, disables data encapsulation for device. |
|
DTE output. |
|
DCE input, low on port bit is +12V, which means ON. |
|
Handshake sense mask. |
|
Software handshake. |
|
Set CTS line is off. |
|
Set DCD line is off. |
|
Set DSR line is off. |
|
Set DTR line is off. |
|
Set RTS line is off. |
|
Receiver disabled. |
|
Transmitter disabled. |
|
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.
|
|
Initialize on chip uart device. Prepares the device for subsequent reading or writing. Enables UART transmitter and receiver interrupts.
|
|
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.
|