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)
 

Detailed Description

Shared Interface definition for UART

Field Documentation

◆ baudSet

ssp_err_t(* uart_api_t::baudSet) (uart_ctrl_t *const p_ctrl, uint32_t const baudrate)

Change baud rate.

Warning
Calling this API aborts any in-progress transmission and disables reception until the new baud settings have been applied.
Implemented as
Parameters
[in]p_ctrlPointer to the UART control block.
[in]baudrateBaud rate in bps.

◆ close

ssp_err_t(* uart_api_t::close) (uart_ctrl_t *const p_ctrl)

Close UART device.

Implemented as
Parameters
[in]p_ctrlPointer to the UART control block.

◆ communicationAbort

ssp_err_t(* uart_api_t::communicationAbort) (uart_ctrl_t *const p_ctrl, uart_dir_t communication_to_abort)

Abort ongoing transfer.

Implemented as
Parameters
[in]p_ctrlPointer to the UART control block.
[in]communication_to_abortType of abort request.

◆ infoGet

ssp_err_t(* uart_api_t::infoGet) (uart_ctrl_t *const p_ctrl, uart_info_t *const p_info)

Get the driver specific information.

Implemented as
Parameters
[in]p_ctrlPointer to the UART control block.
[in]baudrateBaud rate in bps.

◆ open

ssp_err_t(* uart_api_t::open) (uart_ctrl_t *const p_ctrl, uart_cfg_t const *const p_cfg)

Open UART device.

Implemented as
Parameters
[in,out]p_ctrlPointer to the UART control block Must be declared by user. Value set here.
[in]uart_cfg_tPointer to UART configuration structure. All elements of this structure must be set by user.

◆ read

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().

Implemented as
Parameters
[in]p_ctrlPointer to the UART control block for the channel.
[in]p_destDestination address to read data from.
[in]bytesRead 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.

◆ versionGet

ssp_err_t(* uart_api_t::versionGet) (ssp_version_t *p_version)

Get version.

Implemented as
Parameters
[in]p_versionPointer to the memory to store the version information.

◆ write

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().

Implemented as
Parameters
[in]p_ctrlPointer to the UART control block.
[in]p_srcSource address to write data to.
[in]bytesWrite data length.

The documentation for this struct was generated from the following file: