Visible to Intel only — GUID: iga1405468753172
Ixiasoft
Visible to Intel only — GUID: iga1405468753172
Ixiasoft
11.4.1.2. ioctl() Operations
The UART driver supports the ioctl() function to allow HAL-based programs to request device-specific operations. The table below defines operation requests that the UART driver supports.
Request | Description |
---|---|
TIOCEXCL | Locks the device for exclusive access. Further calls to open() for this device will fail until either this file descriptor is closed, or the lock is released using the TIOCNXCL ioctl request. For this request to succeed there can be no other existing file descriptors for this device. The parameter arg is ignored. |
TIOCNXCL | Releases a previous exclusive access lock. The parameter arg is ignored. |
Additional operation requests are also optionally available for the fast driver only, as shown in Optional UART ioctl() Operations for the Fast Driver Only Table. To enable these operations in your program, you must set the preprocessor option -DALTERA_AVALON_UART_USE_IOCTL.
Request | Description |
---|---|
TIOCMGET | Returns the current configuration of the device by filling in the contents of the input termios structure. A pointer to this structure is supplied as the value of the parameter opt. |
TIOCMSET | Sets the configuration of the device according to the values contained in the input termios structure. A pointer to this structure is supplied as the value of the parameter arg. |
For details about the ioctl() function, refer to the Nios II Software Developer's Handbook .