![]() |
Synergy Software Package User's Manual
|
#include <r_uart_api.h>
Data Fields | |
| ssp_err_t(* | open )(uart_ctrl_t *const p_ctrl, uart_cfg_t const *const p_cfg) |
| ssp_err_t(* | read )(uart_ctrl_t *const p_ctrl, uint8_t const *const p_dest, uint32_t const bytes) |
| ssp_err_t(* | write )(uart_ctrl_t *const p_ctrl, uint8_t const *const p_src, uint32_t const bytes) |
| ssp_err_t(* | baudSet )(uart_ctrl_t *const p_ctrl, uint32_t const baudrate) |
| ssp_err_t(* | infoGet )(uart_ctrl_t *const p_ctrl, uart_info_t *const p_info) |
| ssp_err_t(* | close )(uart_ctrl_t *const p_ctrl) |
| ssp_err_t(* | versionGet )(ssp_version_t *p_version) |
| ssp_err_t(* | communicationAbort )(uart_ctrl_t *const p_ctrl, uart_dir_t communication_to_abort) |
Shared Interface definition for UART
| ssp_err_t(* uart_api_t::baudSet) (uart_ctrl_t *const p_ctrl, uint32_t const baudrate) |
Change baud rate.
| [in] | p_ctrl | Pointer to the UART control block. |
| [in] | baudrate | Baud rate in bps. |
| ssp_err_t(* uart_api_t::close) (uart_ctrl_t *const p_ctrl) |
Close UART device.
| [in] | p_ctrl | Pointer to the UART control block. |
| ssp_err_t(* uart_api_t::communicationAbort) (uart_ctrl_t *const p_ctrl, uart_dir_t communication_to_abort) |
Abort ongoing transfer.
| [in] | p_ctrl | Pointer to the UART control block. |
| [in] | communication_to_abort | Type of abort request. |
| ssp_err_t(* uart_api_t::infoGet) (uart_ctrl_t *const p_ctrl, uart_info_t *const p_info) |
Get the driver specific information.
| [in] | p_ctrl | Pointer to the UART control block. |
| [in] | baudrate | Baud rate in bps. |
| ssp_err_t(* uart_api_t::open) (uart_ctrl_t *const p_ctrl, uart_cfg_t const *const p_cfg) |
Open UART device.
| [in,out] | p_ctrl | Pointer to the UART control block Must be declared by user. Value set here. |
| [in] | uart_cfg_t | Pointer to UART configuration structure. All elements of this structure must be set by user. |
| ssp_err_t(* uart_api_t::read) (uart_ctrl_t *const p_ctrl, uint8_t const *const p_dest, uint32_t const bytes) |
Read from UART device. If a transfer instance is used for reception, the received bytes are stored directly in the read input buffer. When a transfer is complete, the callback is called with event UART_EVENT_RX_COMPLETE. Bytes received outside an active transfer are received in the callback function with event UART_EVENT_RX_CHAR. The maximum transfer size is reported by infoGet().
| [in] | p_ctrl | Pointer to the UART control block for the channel. |
| [in] | p_dest | Destination address to read data from. |
| [in] | bytes | Read data length. Only applicable if uart_cfg_t::p_transfer_rx is not NULL. Otherwise all read bytes will be provided through the callback set in uart_cfg_t::p_callback. |
| ssp_err_t(* uart_api_t::versionGet) (ssp_version_t *p_version) |
Get version.
| [in] | p_version | Pointer to the memory to store the version information. |
| ssp_err_t(* uart_api_t::write) (uart_ctrl_t *const p_ctrl, uint8_t const *const p_src, uint32_t const bytes) |
Write to UART device. The write buffer is used until write is complete. Do not overwrite write buffer contents until the write is finished. When the write is complete (all bytes are fully transmitted on the wire), the callback called with event UART_EVENT_TX_COMPLETE. The maximum transfer size is reported by infoGet().
| [in] | p_ctrl | Pointer to the UART control block. |
| [in] | p_src | Source address to write data to. |
| [in] | bytes | Write data length. |