![]() |
RTEMS 6.3
|
Typedefs | |
| typedef enum ALT_16550_MODEM_STATUS_e | ALT_16550_MODEM_STATUS_t |
Enumerations | |
| enum | ALT_16550_MODEM_STATUS_e { ALT_16550_MODEM_STATUS_DCD = 1 << 7 , ALT_16550_MODEM_STATUS_RI = 1 << 6 , ALT_16550_MODEM_STATUS_DSR = 1 << 5 , ALT_16550_MODEM_STATUS_CTS = 1 << 4 , ALT_16550_MODEM_STATUS_DDCD = 1 << 3 , ALT_16550_MODEM_STATUS_TERI = 1 << 2 , ALT_16550_MODEM_STATUS_DDSR = 1 << 1 , ALT_16550_MODEM_STATUS_DCTS = 1 << 0 } |
Functions | |
| ALT_STATUS_CODE | alt_16550_flowcontrol_enable (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_flowcontrol_disable (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_loopback_enable (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_loopback_disable (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_enable_out1 (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_disable_out1 (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_enable_out2 (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_disable_out2 (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_enable_rts (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_disable_rts (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_enable_dtr (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_disable_dtr (ALT_16550_HANDLE_t *handle) |
| ALT_STATUS_CODE | alt_16550_modem_status_get (ALT_16550_HANDLE_t *handle, uint32_t *status) |
This group of APIs provides access, configuration, and control of the UART Modem interface.
| typedef enum ALT_16550_MODEM_STATUS_e ALT_16550_MODEM_STATUS_t |
This type definition enumerates the set of UART modem status conditions as register mask values.
This type definition enumerates the set of UART modem status conditions as register mask values.
| ALT_STATUS_CODE alt_16550_flowcontrol_disable | ( | ALT_16550_HANDLE_t * | handle | ) |
Disables automatic flow control in the UART modem.
The recommended bring down for flow control is as follows:
The receiver FIFO will still be active after these steps.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_flowcontrol_enable | ( | ALT_16550_HANDLE_t * | handle | ) |
Enables automatic flow control in the UART modem. When in this mode, the rts_n is gated with the threshold trigger condition of the receiver FIFO.
The Altera 16550 Compatible Soft IP UART may not have this option enabled.
The FIFOs must be enabled for flow control to be used.
The recommended bring up for flow control is as follows:
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_loopback_disable | ( | ALT_16550_HANDLE_t * | handle | ) |
Takes the UART out of loopback mode.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_loopback_enable | ( | ALT_16550_HANDLE_t * | handle | ) |
Puts the UART in loopback mode. This is used for diagnostic and test purposes.
The SoCFPGA UARTs does not support automatic flow control when in loopback mode.
The Altera 16550 Compatible Soft IP UART implements this in 13.0sp1 and later. Setting this has no effect with 13.0.
When in this mode, the modem control inputs (dsr_n, cts_n, ri_n, dcd_n) are disconnected and the modem control outputs (dtr_n, rts_n, out1_n, out2_n) are held inactive high externally and internally looped back to the inputs.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_disable_dtr | ( | ALT_16550_HANDLE_t * | handle | ) |
Deasserts the DTR (Data Terminal Ready) output. DTR is inverted then driven out to dtr_n.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_disable_out1 | ( | ALT_16550_HANDLE_t * | handle | ) |
Unasserts the OUT1 output. OUT1 is inverted then driven out to out1_n.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_disable_out2 | ( | ALT_16550_HANDLE_t * | handle | ) |
Unasserts the OUT2 output. OUT2 is inverted then driven out to out2_n.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_disable_rts | ( | ALT_16550_HANDLE_t * | handle | ) |
Deaserts the RTS (Request To Send) output. RTS is inverted then driven out to rts_n.
There are special considerations when the UART is in automatic flow control mode. See alt_16550_flowcontrol_enable() for more information.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_enable_dtr | ( | ALT_16550_HANDLE_t * | handle | ) |
Asserts the DTR (Data Terminal Ready) output. DTR is inverted then driven out to dtr_n. DTR is used to inform the modem that UART is ready to establish communications.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_enable_out1 | ( | ALT_16550_HANDLE_t * | handle | ) |
Asserts the OUT1 output. OUT1 is inverted then driven out to out1_n.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_enable_out2 | ( | ALT_16550_HANDLE_t * | handle | ) |
Asserts the OUT2 output. OUT2 is inverted then driven out to out2_n.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_enable_rts | ( | ALT_16550_HANDLE_t * | handle | ) |
Asserts the RTS (Request To Send) output. RTS is inverted then driven out to rts_n. RTS is used to inform the modem that the UART is ready to receive data.
There are special considerations when the UART is in automatic flow control mode. See alt_16550_flowcontrol_enable() for more information.
There are special considerations when the UART is in loopback mode. See alt_16550_loopback_enable() for more information.
| handle | The UART device handle. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |
| ALT_STATUS_CODE alt_16550_modem_status_get | ( | ALT_16550_HANDLE_t * | handle, |
| uint32_t * | status ) |
Reads the modem status from the UART.
| handle | The UART device handle. |
| status | [out] Pointer to an output parameter that contains the current modem status of the UART as a register mask. |
| ALT_E_SUCCESS | The operation was successful. |
| ALT_E_ERROR | The operation failed. |
| ALT_E_BAD_ARG | The given UART device handle is invalid. |