![]() |
These commands are used to control and retrieve hardware specific configurations. The definitions are kept independent from the underlying hardware, but not all commands may be fully implemented in each UART driver.
The _ioctl() function expects three parameters:
Modules | |
UART Status | |
UART device status flags,. | |
XgUARTHS | |
UART handshake modes. | |
XgUARTClock | |
UART device clock modes. | |
Defines | |
#define | UART_SETSPEED 0x0101 |
UART _ioctl() command code to set the line speed. | |
#define | UART_GETSPEED 0x0102 |
UART _ioctl() command code to query the line speed. | |
#define | UART_SETDATABITS 0x0103 |
UART _ioctl() command code to set the number of data bits. | |
#define | UART_GETDATABITS 0x0104 |
UART _ioctl() command code to query the number of data bits. | |
#define | UART_SETPARITY 0x0105 |
UART _ioctl() command code to set the parity mode. | |
#define | UART_GETPARITY 0x0106 |
UART _ioctl() command code to query the parity mode. | |
#define | UART_SETSTOPBITS 0x0107 |
UART _ioctl() command code to set the number of stop bits. | |
#define | UART_GETSTOPBITS 0x0108 |
UART _ioctl() command code to query the number of stop bits. | |
#define | UART_SETSTATUS 0x0109 |
UART _ioctl() command code to set the status. | |
#define | UART_GETSTATUS 0x010a |
UART _ioctl() command code to query the status. | |
#define | UART_SETREADTIMEOUT 0x010b |
UART _ioctl() command code to set the read timeout. | |
#define | UART_GETREADTIMEOUT 0x010c |
UART _ioctl() command code to query the read timeout. | |
#define | UART_SETWRITETIMEOUT 0x010d |
UART _ioctl() command code to set the write timeout. | |
#define | UART_GETWRITETIMEOUT 0x010e |
UART _ioctl() command code to query the write timeout. | |
#define | UART_SETLOCALECHO 0x010f |
UART _ioctl() command code to set the local echo mode. | |
#define | UART_GETLOCALECHO 0x0110 |
UART _ioctl() command code to query the local echo mode. | |
#define | UART_SETFLOWCONTROL 0x0111 |
UART _ioctl() command code to set the flow control mode. | |
#define | UART_GETFLOWCONTROL 0x0112 |
UART _ioctl() command code to query the flow control mode. | |
#define | UART_SETCOOKEDMODE 0x0113 |
UART _ioctl() command code to set the cooking mode. | |
#define | UART_GETCOOKEDMODE 0x0114 |
UART _ioctl() command code to query the cooking mode. | |
#define | UART_SETBUFFERMODE 0x0115 |
UART _ioctl() command code to set the buffering mode. | |
#define | UART_GETBUFFERMODE 0x0116 |
UART _ioctl() command code to query the buffering mode. | |
#define | HDLC_SETIFNET 0x0117 |
UART _ioctl() command code to set the network interface mode. | |
#define | HDLC_GETIFNET 0x0118 |
UART _ioctl() command code to query the network interface mode. | |
#define | UART_SETCLOCKMODE 0x0119 |
UART _ioctl() command code to set the clock mode. | |
#define | UART_GETCLOCKMODE 0x011a |
UART _ioctl() command code to query the clock mode. | |
#define | UART_SETTXBUFSIZ 0x011b |
UART _ioctl() command code to set the transmit buffer size. | |
#define | UART_GETTXBUFSIZ 0x011c |
UART _ioctl() command code to query the transmit buffer size. | |
#define | UART_SETRXBUFSIZ 0x011d |
UART _ioctl() command code to set the receive buffer size. | |
#define | UART_GETRXBUFSIZ 0x011e |
UART _ioctl() command code to query the receive buffer size. | |
#define | UART_SETTXBUFLWMARK 0x0120 |
UART _ioctl() command code to set the transmit buffer low watermark. | |
#define | UART_GETTXBUFLWMARK 0x0121 |
UART _ioctl() command code to query the transmit buffer low watermark. | |
#define | UART_SETTXBUFHWMARK 0x0122 |
UART _ioctl() command code to set the transmit buffer high watermark. | |
#define | UART_GETTXBUFHWMARK 0x0123 |
UART _ioctl() command code to query the transmit buffer high watermark. | |
#define | UART_SETRXBUFLWMARK 0x0124 |
UART _ioctl() command code to set the receive buffer low watermark. | |
#define | UART_GETRXBUFLWMARK 0x0125 |
UART _ioctl() command code to query the receive buffer low watermark. | |
#define | UART_SETRXBUFHWMARK 0x0126 |
UART _ioctl() command code to set the receive buffer high watermark. | |
#define | UART_GETRXBUFHWMARK 0x0127 |
UART _ioctl() command code to query the receive buffer high watermark. | |
#define | UART_SETBLOCKREAD 0x0128 |
UART _ioctl() command code to set the block read mode. | |
#define | UART_GETBLOCKREAD 0x0129 |
UART _ioctl() command code to query the receive buffer high watermark. | |
#define | UART_SETRAWMODE 0x012a |
UART _ioctl() command code to set physical device to the raw mode. | |
#define | UART_GETRAWMODE 0x012b |
UART _ioctl() command code to query the raw mode. |
#define UART_SETSPEED 0x0101 |
UART _ioctl() command code to set the line speed.
The configuration parameter specifies the input and output bit rate per second.
Definition at line 106 of file uart.h.
Referenced by AhdlcAvrInit(), AhdlcAvrIOCtl(), InitDebugDevice(), main(), UartAvrInit(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETSPEED 0x0102 |
UART _ioctl() command code to query the line speed.
The configuration parameter is set to the input and output bit rate per second.
Definition at line 113 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETDATABITS 0x0103 |
UART _ioctl() command code to set the number of data bits.
The configuration parameter specifies the number of data bits, 5, 6, 7, 8 or 9.
Definition at line 120 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETDATABITS 0x0104 |
UART _ioctl() command code to query the number of data bits.
The configuration parameter is set to the number of data bits, 5, 6, 7, 8 or 9.
Definition at line 127 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETPARITY 0x0105 |
UART _ioctl() command code to set the parity mode.
The configuration parameter specifies the type of the parity bit, 0 (none), 1 (odd) or 2 (even).
Definition at line 134 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETPARITY 0x0106 |
UART _ioctl() command code to query the parity mode.
The configuration parameter is set to the type of the parity bit, 0 (none), 1 (odd) or 2 (even).
Definition at line 141 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETSTOPBITS 0x0107 |
UART _ioctl() command code to set the number of stop bits.
The configuration parameter specifies the number of stop bits, 1 or 2.
Definition at line 147 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETSTOPBITS 0x0108 |
UART _ioctl() command code to query the number of stop bits.
The configuration parameter is set to the number of stop bits, 1 or 2.
Definition at line 153 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETSTATUS 0x0109 |
UART _ioctl() command code to set the status.
The configuration parameter specifies the status to set.
Definition at line 159 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETSTATUS 0x010a |
UART _ioctl() command code to query the status.
The configuration parameter is set to the current status.
Definition at line 165 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETREADTIMEOUT 0x010b |
UART _ioctl() command code to set the read timeout.
The configuration parameter specifies the read timeout in milliseconds.
Definition at line 172 of file uart.h.
Referenced by AhdlcAvrIOCtl(), main(), NutChatSend(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETREADTIMEOUT 0x010c |
UART _ioctl() command code to query the read timeout.
The configuration parameter is set to the read timeout in milliseconds.
Definition at line 179 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETWRITETIMEOUT 0x010d |
UART _ioctl() command code to set the write timeout.
The configuration parameter specifies the write timeout in milliseconds.
Definition at line 186 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETWRITETIMEOUT 0x010e |
UART _ioctl() command code to query the write timeout.
The configuration parameter is set to the write timeout in milliseconds.
Definition at line 193 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETLOCALECHO 0x010f |
UART _ioctl() command code to set the local echo mode.
The configuration parameter specifies the local echo mode, 0 (off) or 1 (on).
Definition at line 200 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETLOCALECHO 0x0110 |
UART _ioctl() command code to query the local echo mode.
The configuration parameter is set to the local echo mode, 0 (off) or 1 (on).
Definition at line 207 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETFLOWCONTROL 0x0111 |
UART _ioctl() command code to set the flow control mode.
The configuration parameter specifies the flow control mode.
Definition at line 213 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETFLOWCONTROL 0x0112 |
UART _ioctl() command code to query the flow control mode.
The configuration parameter is set to the flow control mode.
Definition at line 219 of file uart.h.
Referenced by AhdlcAvrIOCtl(), UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETCOOKEDMODE 0x0113 |
UART _ioctl() command code to set the cooking mode.
The configuration parameter specifies the character cooking mode, 0 (raw) or 1 (EOL translation).
Definition at line 226 of file uart.h.
Referenced by UartAvrIOCtl(), and UsartIOCtl().
#define UART_GETCOOKEDMODE 0x0114 |
UART _ioctl() command code to query the cooking mode.
The configuration parameter is set to the character cooking mode, 0 (raw) or 1 (EOL translation).
Definition at line 233 of file uart.h.
Referenced by UartAvrIOCtl(), and UsartIOCtl().
#define UART_SETBUFFERMODE 0x0115 |
#define UART_GETBUFFERMODE 0x0116 |
#define HDLC_SETIFNET 0x0117 |
UART _ioctl() command code to set the network interface mode.
The configuration parameter specifies the network interface mode.
Definition at line 251 of file uart.h.
Referenced by AhdlcAvrIOCtl(), IpcpLowerDown(), and NutNetIfConfig2().
#define HDLC_GETIFNET 0x0118 |
UART _ioctl() command code to query the network interface mode.
The configuration parameter is set to the network interface mode.
Definition at line 257 of file uart.h.
Referenced by AhdlcAvrIOCtl().
#define UART_SETCLOCKMODE 0x0119 |
UART _ioctl() command code to set the clock mode.
The configuration parameter specifies the clock mode.
Definition at line 263 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETCLOCKMODE 0x011a |
UART _ioctl() command code to query the clock mode.
The configuration parameter is set to the clock mode.
Definition at line 269 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETTXBUFSIZ 0x011b |
UART _ioctl() command code to set the transmit buffer size.
The configuration parameter specifies the number of bytes.
Definition at line 275 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETTXBUFSIZ 0x011c |
UART _ioctl() command code to query the transmit buffer size.
The configuration parameter specifies the number of bytes.
Definition at line 281 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETRXBUFSIZ 0x011d |
UART _ioctl() command code to set the receive buffer size.
The configuration parameter specifies the number of bytes.
Definition at line 287 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETRXBUFSIZ 0x011e |
UART _ioctl() command code to query the receive buffer size.
The configuration parameter specifies the number of bytes.
Definition at line 293 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETTXBUFLWMARK 0x0120 |
UART _ioctl() command code to set the transmit buffer low watermark.
The configuration parameter specifies the number of bytes.
Definition at line 299 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETTXBUFLWMARK 0x0121 |
UART _ioctl() command code to query the transmit buffer low watermark.
The configuration parameter specifies the number of bytes.
Definition at line 305 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETTXBUFHWMARK 0x0122 |
UART _ioctl() command code to set the transmit buffer high watermark.
The configuration parameter specifies the number of bytes.
Definition at line 311 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETTXBUFHWMARK 0x0123 |
UART _ioctl() command code to query the transmit buffer high watermark.
The configuration parameter specifies the number of bytes.
Definition at line 317 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETRXBUFLWMARK 0x0124 |
UART _ioctl() command code to set the receive buffer low watermark.
The configuration parameter specifies the number of bytes.
Definition at line 323 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETRXBUFLWMARK 0x0125 |
UART _ioctl() command code to query the receive buffer low watermark.
The configuration parameter specifies the number of bytes.
Definition at line 329 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETRXBUFHWMARK 0x0126 |
UART _ioctl() command code to set the receive buffer high watermark.
The configuration parameter specifies the number of bytes.
Definition at line 335 of file uart.h.
Referenced by UsartIOCtl().
#define UART_GETRXBUFHWMARK 0x0127 |
UART _ioctl() command code to query the receive buffer high watermark.
The configuration parameter specifies the number of bytes.
Definition at line 341 of file uart.h.
Referenced by UsartIOCtl().
#define UART_SETBLOCKREAD 0x0128 |
#define UART_GETBLOCKREAD 0x0129 |
#define UART_SETRAWMODE 0x012a |
UART _ioctl() command code to set physical device to the raw mode.
The configuration parameter specifies the raw mode for device. In raw mode data encapsulation is not allowed to be done. This allows other processing to be done on physical device.
Definition at line 361 of file uart.h.
Referenced by AhdlcAvrIOCtl().
#define UART_GETRAWMODE 0x012b |
UART _ioctl() command code to query the raw mode.
The configuration parameter specified the raw mode.
Definition at line 367 of file uart.h.
Referenced by AhdlcAvrIOCtl().