Wirepas SDK
usart_multi.h File Reference

Go to the source code of this file.

Typedefs

typedef void usart_multi_instance_t
 Opaque instance type - driver owns memory, user holds pointer.
 
typedef void(* usart_multi_rx_callback_f) (usart_multi_instance_id_t instance_id, const uint8_t *p_data, size_t length)
 RX data callback - called when data received.
 
typedef void(* usart_multi_tx_callback_f) (usart_multi_instance_id_t instance_id)
 TX complete callback - called when TX finishes.
 
typedef void(* usart_multi_error_callback_f) (usart_multi_instance_id_t instance_id, uint32_t error_flags)
 Error callback - called on UART errors.
 
typedef void(* usart_multi_idle_callback_f) (usart_multi_instance_id_t instance_id, const uint8_t *p_data, size_t length)
 Idle line callback - called when RX line goes idle.
 

Functions

usart_multi_status_t usart_multi_init (usart_multi_instance_t **pp_instance, usart_multi_instance_id_t instance_id, const usart_multi_init_params_t *p_params)
 Initialize UART instance from driver's static pool.
 
usart_multi_status_t usart_multi_deinit (usart_multi_instance_t **pp_instance)
 Deinitialize UART instance.
 
usart_multi_status_t usart_multi_set_enabled (usart_multi_instance_t *p_instance, bool enabled)
 Enable or disable UART peripheral.
 
usart_multi_status_t usart_multi_set_flow_control (usart_multi_instance_t *p_instance, usart_multi_flow_control_e flow_control)
 Change flow control mode.
 
usart_multi_status_t usart_multi_send_buffer (usart_multi_instance_t *p_instance, const void *p_buf, size_t len)
 Queue data for transmission.
 
usart_multi_status_t usart_multi_flush (usart_multi_instance_t *p_instance)
 Block until all pending TX data transmitted.
 
usart_multi_status_t usart_multi_abort_transmit (usart_multi_instance_t *p_instance)
 Abort ongoing TX transfer.
 
usart_multi_status_t usart_multi_enable_receiver (usart_multi_instance_t *p_instance)
 Start receiver.
 
usart_multi_status_t usart_multi_abort_receive (usart_multi_instance_t *p_instance)
 Abort ongoing RX transfer and stop receiver.
 
usart_multi_status_t usart_multi_register_rx_callback (usart_multi_instance_t *p_instance, usart_multi_rx_callback_f p_callback)
 Register RX data callback.
 
usart_multi_status_t usart_multi_register_tx_callback (usart_multi_instance_t *p_instance, usart_multi_tx_callback_f p_callback)
 Register TX complete callback.
 
usart_multi_status_t usart_multi_register_error_callback (usart_multi_instance_t *p_instance, usart_multi_error_callback_f p_callback)
 Register error callback for error notification.
 
usart_multi_status_t usart_multi_register_idle_callback (usart_multi_instance_t *p_instance, usart_multi_idle_callback_f p_callback)
 Register idle line detection callback.
 
size_t usart_multi_get_max_tx_size (const usart_multi_instance_t *p_instance)
 Get maximum bytes per usart_multi_send_buffer() call.
 
uint8_t usart_multi_get_instance_count (void)
 Get total UART instances available on platform.
 
usart_multi_status_t usart_multi_get_error_stats (const usart_multi_instance_t *p_instance, usart_multi_error_stats_t *p_stats)
 Retrieve accumulated error statistics.
 
usart_multi_status_t usart_multi_clear_error_stats (usart_multi_instance_t *p_instance)
 Reset all error counters to zero.
 

Data Structures

struct  usart_multi_data_format_t
 Data format configuration. More...
 
struct  usart_multi_init_params_t
 Initialization parameters for UART instance. More...
 
struct  usart_multi_error_stats_t
 Error statistics counters. More...
 

Enumerations

enum  usart_multi_instance_id_t {
  USART_MULTI_INSTANCE_0 = 0 , USART_MULTI_INSTANCE_1 = 1 , USART_MULTI_INSTANCE_2 = 2 , USART_MULTI_INSTANCE_3 = 3 ,
  USART_MULTI_INSTANCE_4 = 4 , USART_MULTI_INSTANCE_5 = 5 , USART_MULTI_INSTANCE_6 = 6 , USART_MULTI_INSTANCE_7 = 7 ,
  USART_MULTI_INSTANCE_8 = 8 , USART_MULTI_INSTANCE_9 = 9
}
 Instance ID - identifies which UART peripheral. More...
 
enum  usart_multi_flow_control_e { USART_MULTI_FLOW_CONTROL_NONE = 0 , USART_MULTI_FLOW_CONTROL_HW = 1 }
 Flow control modes. More...
 
enum  usart_multi_mode_e { USART_MULTI_MODE_ASYNC = 0 , USART_MULTI_MODE_SYNC_MASTER = 1 , USART_MULTI_MODE_SYNC_SLAVE = 2 }
 Communication modes. More...
 
enum  usart_multi_power_mode_e { USART_MULTI_POWER_MODE_NORMAL = 0 , USART_MULTI_POWER_MODE_LOW_POWER = 1 }
 Power modes. More...
 
enum  usart_multi_parity_e { USART_MULTI_PARITY_NONE = 0 , USART_MULTI_PARITY_EVEN = 1 , USART_MULTI_PARITY_ODD = 2 }
 Parity modes. More...
 
enum  usart_multi_stop_bits_e { USART_MULTI_STOP_BITS_1 = 0 , USART_MULTI_STOP_BITS_2 = 1 }
 Stop bits. More...
 
enum  usart_multi_error_flags_e {
  USART_MULTI_ERROR_FLAG_NONE = 0x00 , USART_MULTI_ERROR_FLAG_OVERRUN = 0x01 , USART_MULTI_ERROR_FLAG_FRAMING = 0x02 , USART_MULTI_ERROR_FLAG_PARITY = 0x04 ,
  USART_MULTI_ERROR_FLAG_BREAK = 0x08
}
 Error event flags - can be OR'd together. More...
 
enum  usart_multi_status_t {
  USART_MULTI_SUCCESS = 0 , USART_MULTI_ERROR_INVALID_PARAM , USART_MULTI_ERROR_NOT_INITIALIZED , USART_MULTI_ERROR_ALREADY_INITIALIZED ,
  USART_MULTI_ERROR_HARDWARE , USART_MULTI_ERROR_BUSY , USART_MULTI_ERROR_NOT_SUPPORTED , USART_MULTI_ERROR_TIMEOUT ,
  USART_MULTI_ERROR_BUFFER_FULL , USART_MULTI_ERROR_NOT_ENABLED
}
 Status codes returned by API functions. More...
 

Typedef Documentation

◆ usart_multi_error_callback_f

typedef void(* usart_multi_error_callback_f) (usart_multi_instance_id_t instance_id, uint32_t error_flags)

Error callback - called on UART errors.

Parameters
instance_idUART instance that triggered callback
error_flagsBitmask of error flags (usart_multi_error_flags_e)
Note
Runs in ISR context

Definition at line 187 of file usart_multi.h.

◆ usart_multi_idle_callback_f

typedef void(* usart_multi_idle_callback_f) (usart_multi_instance_id_t instance_id, const uint8_t *p_data, size_t length)

Idle line callback - called when RX line goes idle.

Parameters
instance_idUART instance that triggered callback
p_dataPointer to received data (read-only)
lengthNumber of bytes received before idle
Note
Runs in ISR context

Definition at line 197 of file usart_multi.h.

◆ usart_multi_instance_t

typedef void usart_multi_instance_t

Opaque instance type - driver owns memory, user holds pointer.

Definition at line 49 of file usart_multi.h.

◆ usart_multi_rx_callback_f

typedef void(* usart_multi_rx_callback_f) (usart_multi_instance_id_t instance_id, const uint8_t *p_data, size_t length)

RX data callback - called when data received.

Parameters
instance_idUART instance that triggered callback
p_dataPointer to received data (read-only)
lengthNumber of bytes received
Note
Runs in ISR context

Definition at line 170 of file usart_multi.h.

◆ usart_multi_tx_callback_f

typedef void(* usart_multi_tx_callback_f) (usart_multi_instance_id_t instance_id)

TX complete callback - called when TX finishes.

Parameters
instance_idUART instance that triggered callback
Note
Runs in ISR context

Definition at line 179 of file usart_multi.h.

Function Documentation

◆ usart_multi_abort_receive()

usart_multi_status_t usart_multi_abort_receive ( usart_multi_instance_t *  p_instance)

Abort ongoing RX transfer and stop receiver.

Parameters
p_instanceInstance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSReception aborted successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_NOT_SUPPORTEDAbort not supported on this platform
USART_MULTI_ERROR_HARDWAREHardware abort failed

◆ usart_multi_abort_transmit()

usart_multi_status_t usart_multi_abort_transmit ( usart_multi_instance_t *  p_instance)

Abort ongoing TX transfer.

Parameters
p_instanceInstance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSTransmission aborted successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_NOT_SUPPORTEDAbort not supported on this platform
USART_MULTI_ERROR_HARDWAREHardware abort failed

◆ usart_multi_clear_error_stats()

usart_multi_status_t usart_multi_clear_error_stats ( usart_multi_instance_t *  p_instance)

Reset all error counters to zero.

Parameters
p_instanceInstance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSError counters cleared successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_deinit()

usart_multi_status_t usart_multi_deinit ( usart_multi_instance_t **  pp_instance)

Deinitialize UART instance.

Stops all transfers, disables peripheral, and sets *pp_instance to NULL

Parameters
pp_instancePointer to instance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSInstance deinitialized successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer or *pp_instance is NULL
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_HARDWAREHardware deinitialization failed

◆ usart_multi_enable_receiver()

usart_multi_status_t usart_multi_enable_receiver ( usart_multi_instance_t *  p_instance)

Start receiver.

RX callback must be registered first using usart_multi_register_rx_callback()

Parameters
p_instanceInstance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSReceiver started successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_NOT_ENABLEDUART not enabled
USART_MULTI_ERROR_HARDWAREHardware RX enable failed

◆ usart_multi_flush()

usart_multi_status_t usart_multi_flush ( usart_multi_instance_t *  p_instance)

Block until all pending TX data transmitted.

Parameters
p_instanceInstance pointer
Returns
Status code
Return values
USART_MULTI_SUCCESSAll data transmitted successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_TIMEOUTTransmission did not complete in time
USART_MULTI_ERROR_HARDWAREHardware error during transmission

◆ usart_multi_get_error_stats()

usart_multi_status_t usart_multi_get_error_stats ( const usart_multi_instance_t *  p_instance,
usart_multi_error_stats_t *  p_stats 
)

Retrieve accumulated error statistics.

Parameters
p_instanceInstance pointer
p_statsStatistics structure to populate
Returns
Status code
Return values
USART_MULTI_SUCCESSStatistics retrieved successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_get_instance_count()

uint8_t usart_multi_get_instance_count ( void  )

Get total UART instances available on platform.

Returns
Number of available UART instances

◆ usart_multi_get_max_tx_size()

size_t usart_multi_get_max_tx_size ( const usart_multi_instance_t *  p_instance)

Get maximum bytes per usart_multi_send_buffer() call.

Parameters
p_instanceInstance pointer
Returns
Maximum TX size in bytes, or 0 if instance is NULL or not initialized

◆ usart_multi_init()

usart_multi_status_t usart_multi_init ( usart_multi_instance_t **  pp_instance,
usart_multi_instance_id_t  instance_id,
const usart_multi_init_params_t *  p_params 
)

Initialize UART instance from driver's static pool.

On success, populates *pp_instance with pointer to instance from driver's memory pool. UART starts disabled - call usart_multi_set_enabled(true) to activate.

Parameters
pp_instancePointer to instance pointer (populated by driver)
instance_idInstance ID to initialize (USART_MULTI_INSTANCE_0, etc.)
p_paramsInitialization parameters
Returns
Status code
Return values
USART_MULTI_SUCCESSInstance initialized successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer, invalid instance_id, or invalid parameters
USART_MULTI_ERROR_ALREADY_INITIALIZEDInstance already initialized
USART_MULTI_ERROR_HARDWAREHardware initialization failed

◆ usart_multi_register_error_callback()

usart_multi_status_t usart_multi_register_error_callback ( usart_multi_instance_t *  p_instance,
usart_multi_error_callback_f  p_callback 
)

Register error callback for error notification.

Pass NULL to disable. Callback runs in ISR context.

Parameters
p_instanceInstance pointer
p_callbackCallback function (NULL to disable)
Returns
Status code
Return values
USART_MULTI_SUCCESSCallback registered successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_register_idle_callback()

usart_multi_status_t usart_multi_register_idle_callback ( usart_multi_instance_t *  p_instance,
usart_multi_idle_callback_f  p_callback 
)

Register idle line detection callback.

Pass NULL to disable. Requires idle_detect_enabled = true during init. Callback runs in ISR context. Used for variable-length packet detection.

Parameters
p_instanceInstance pointer
p_callbackCallback function (NULL to disable)
Returns
Status code
Return values
USART_MULTI_SUCCESSCallback registered successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_register_rx_callback()

usart_multi_status_t usart_multi_register_rx_callback ( usart_multi_instance_t *  p_instance,
usart_multi_rx_callback_f  p_callback 
)

Register RX data callback.

Callback must be provided (cannot be NULL). Callback runs in ISR context.

Parameters
p_instanceInstance pointer
p_callbackCallback function
Returns
Status code
Return values
USART_MULTI_SUCCESSCallback registered successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer or NULL callback
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_register_tx_callback()

usart_multi_status_t usart_multi_register_tx_callback ( usart_multi_instance_t *  p_instance,
usart_multi_tx_callback_f  p_callback 
)

Register TX complete callback.

Pass NULL to disable. Callback runs in ISR context.

Parameters
p_instanceInstance pointer
p_callbackCallback function (NULL to disable)
Returns
Status code
Return values
USART_MULTI_SUCCESSCallback registered successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized

◆ usart_multi_send_buffer()

usart_multi_status_t usart_multi_send_buffer ( usart_multi_instance_t *  p_instance,
const void *  p_buf,
size_t  len 
)

Queue data for transmission.

All-or-nothing: either all data queued (returns SUCCESS) or none. Non-blocking operation.

Parameters
p_instanceInstance pointer
p_bufBuffer to transmit (read-only)
lenNumber of bytes to transmit
Returns
Status code
Return values
USART_MULTI_SUCCESSAll data queued for transmission
USART_MULTI_ERROR_INVALID_PARAMNULL pointer or len exceeds max TX size
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_NOT_ENABLEDUART not enabled
USART_MULTI_ERROR_BUFFER_FULLTX buffer full, no space for this data
USART_MULTI_ERROR_HARDWAREHardware error during queuing

◆ usart_multi_set_enabled()

usart_multi_status_t usart_multi_set_enabled ( usart_multi_instance_t *  p_instance,
bool  enabled 
)

Enable or disable UART peripheral.

Uses reference counting - multiple enables require matching disables

Parameters
p_instanceInstance pointer
enabledTrue to enable, false to disable
Returns
Status code
Return values
USART_MULTI_SUCCESSUART enabled/disabled successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_HARDWAREHardware enable/disable failed

◆ usart_multi_set_flow_control()

usart_multi_status_t usart_multi_set_flow_control ( usart_multi_instance_t *  p_instance,
usart_multi_flow_control_e  flow_control 
)

Change flow control mode.

Parameters
p_instanceInstance pointer
flow_controlDesired flow control mode
Returns
Status code
Return values
USART_MULTI_SUCCESSFlow control configured successfully
USART_MULTI_ERROR_INVALID_PARAMNULL pointer or invalid value
USART_MULTI_ERROR_NOT_INITIALIZEDInstance not initialized
USART_MULTI_ERROR_NOT_ENABLEDUART is enabled (must disable first)
USART_MULTI_ERROR_NOT_SUPPORTEDFlow control not supported on platform
USART_MULTI_ERROR_HARDWAREHardware configuration failed

Data Structure Documentation

◆ usart_multi_data_format_t

struct usart_multi_data_format_t

Data format configuration.

Definition at line 130 of file usart_multi.h.

Data Fields
uint8_t data_bits

7, 8 (default), or 9 data bits

usart_multi_parity_e parity

Parity mode (0 = NONE, default)

usart_multi_stop_bits_e stop_bits

Stop bits (0 = 1 bit, default)

◆ usart_multi_init_params_t

struct usart_multi_init_params_t

Initialization parameters for UART instance.

Definition at line 140 of file usart_multi.h.

Data Fields
uint32_t baudrate

Baud rate (9600-3000000)

usart_multi_data_format_t data_format

Data format (default: 8N1)

bool dma_enabled

Enable DMA transfers

usart_multi_flow_control_e flow_control

Flow control (0 = NONE, default)

bool idle_detect_enabled

Enable idle line detection

usart_multi_mode_e mode

Communication mode (0 = ASYNC, default)

usart_multi_power_mode_e power_mode

Power mode (0 = NORMAL, default)

bool wakeup_enabled

RX wake from sleep (EUSART only)

◆ usart_multi_error_stats_t

struct usart_multi_error_stats_t

Error statistics counters.

Definition at line 155 of file usart_multi.h.

Data Fields
uint32_t break_errors

Break condition count

uint32_t framing_errors

Framing error count (baud mismatch)

uint32_t overrun_errors

RX overrun count (data lost)

uint32_t parity_errors

Parity error count

Enumeration Type Documentation

◆ usart_multi_error_flags_e

Error event flags - can be OR'd together.

Enumerator
USART_MULTI_ERROR_FLAG_NONE 

No error

USART_MULTI_ERROR_FLAG_OVERRUN 

RX overrun (data lost)

USART_MULTI_ERROR_FLAG_FRAMING 

Invalid start/stop bits

USART_MULTI_ERROR_FLAG_PARITY 

Parity check failed

USART_MULTI_ERROR_FLAG_BREAK 

Break condition

Definition at line 101 of file usart_multi.h.

102{
usart_multi_error_flags_e
Error event flags - can be OR'd together.
@ USART_MULTI_ERROR_FLAG_FRAMING
@ USART_MULTI_ERROR_FLAG_NONE
@ USART_MULTI_ERROR_FLAG_PARITY
@ USART_MULTI_ERROR_FLAG_OVERRUN
@ USART_MULTI_ERROR_FLAG_BREAK

◆ usart_multi_flow_control_e

Flow control modes.

Enumerator
USART_MULTI_FLOW_CONTROL_NONE 

No flow control (default)

USART_MULTI_FLOW_CONTROL_HW 

Hardware RTS/CTS

Definition at line 54 of file usart_multi.h.

55{
usart_multi_flow_control_e
Flow control modes.
Definition usart_multi.h:55
@ USART_MULTI_FLOW_CONTROL_NONE
Definition usart_multi.h:56
@ USART_MULTI_FLOW_CONTROL_HW
Definition usart_multi.h:57

◆ usart_multi_instance_id_t

Instance ID - identifies which UART peripheral.

Enumerator
USART_MULTI_INSTANCE_0 

UART instance 0

USART_MULTI_INSTANCE_1 

UART instance 1

USART_MULTI_INSTANCE_2 

UART instance 2

USART_MULTI_INSTANCE_3 

UART instance 3

USART_MULTI_INSTANCE_4 

UART instance 4

USART_MULTI_INSTANCE_5 

UART instance 5

USART_MULTI_INSTANCE_6 

UART instance 6

USART_MULTI_INSTANCE_7 

UART instance 7

USART_MULTI_INSTANCE_8 

UART instance 8

USART_MULTI_INSTANCE_9 

UART instance 9

Definition at line 32 of file usart_multi.h.

33{
usart_multi_instance_id_t
Instance ID - identifies which UART peripheral.
Definition usart_multi.h:33
@ USART_MULTI_INSTANCE_8
Definition usart_multi.h:42
@ USART_MULTI_INSTANCE_5
Definition usart_multi.h:39
@ USART_MULTI_INSTANCE_1
Definition usart_multi.h:35
@ USART_MULTI_INSTANCE_2
Definition usart_multi.h:36
@ USART_MULTI_INSTANCE_9
Definition usart_multi.h:43
@ USART_MULTI_INSTANCE_3
Definition usart_multi.h:37
@ USART_MULTI_INSTANCE_4
Definition usart_multi.h:38
@ USART_MULTI_INSTANCE_7
Definition usart_multi.h:41
@ USART_MULTI_INSTANCE_0
Definition usart_multi.h:34
@ USART_MULTI_INSTANCE_6
Definition usart_multi.h:40

◆ usart_multi_mode_e

Communication modes.

Enumerator
USART_MULTI_MODE_ASYNC 

Asynchronous (default, all platforms)

USART_MULTI_MODE_SYNC_MASTER 

Synchronous master (USART/EUSART only)

USART_MULTI_MODE_SYNC_SLAVE 

Synchronous slave (USART/EUSART only)

Definition at line 63 of file usart_multi.h.

64{
usart_multi_mode_e
Communication modes.
Definition usart_multi.h:64
@ USART_MULTI_MODE_SYNC_SLAVE
Definition usart_multi.h:67
@ USART_MULTI_MODE_SYNC_MASTER
Definition usart_multi.h:66
@ USART_MULTI_MODE_ASYNC
Definition usart_multi.h:65

◆ usart_multi_parity_e

Parity modes.

Enumerator
USART_MULTI_PARITY_NONE 

No parity (default, 8N1)

USART_MULTI_PARITY_EVEN 

Even parity

USART_MULTI_PARITY_ODD 

Odd parity

Definition at line 82 of file usart_multi.h.

83{
usart_multi_parity_e
Parity modes.
Definition usart_multi.h:83
@ USART_MULTI_PARITY_NONE
Definition usart_multi.h:84
@ USART_MULTI_PARITY_EVEN
Definition usart_multi.h:85
@ USART_MULTI_PARITY_ODD
Definition usart_multi.h:86

◆ usart_multi_power_mode_e

Power modes.

Enumerator
USART_MULTI_POWER_MODE_NORMAL 

Normal power (default)

USART_MULTI_POWER_MODE_LOW_POWER 

Low-power mode (EUSART: EM2)

Definition at line 73 of file usart_multi.h.

74{
usart_multi_power_mode_e
Power modes.
Definition usart_multi.h:74
@ USART_MULTI_POWER_MODE_LOW_POWER
Definition usart_multi.h:76
@ USART_MULTI_POWER_MODE_NORMAL
Definition usart_multi.h:75

◆ usart_multi_status_t

Status codes returned by API functions.

Enumerator
USART_MULTI_SUCCESS 

Operation successful

USART_MULTI_ERROR_INVALID_PARAM 

Invalid parameter (NULL, out of range, etc.)

USART_MULTI_ERROR_NOT_INITIALIZED 

Instance not initialized

USART_MULTI_ERROR_ALREADY_INITIALIZED 

Instance already initialized

USART_MULTI_ERROR_HARDWARE 

Hardware failure

USART_MULTI_ERROR_BUSY 

Resource busy

USART_MULTI_ERROR_NOT_SUPPORTED 

Feature not supported on platform

USART_MULTI_ERROR_TIMEOUT 

Operation timed out

USART_MULTI_ERROR_BUFFER_FULL 

TX buffer full (no space)

USART_MULTI_ERROR_NOT_ENABLED 

UART peripheral not enabled

Definition at line 113 of file usart_multi.h.

114{
usart_multi_status_t
Status codes returned by API functions.
@ USART_MULTI_ERROR_HARDWARE
@ USART_MULTI_ERROR_NOT_ENABLED
@ USART_MULTI_ERROR_INVALID_PARAM
@ USART_MULTI_ERROR_ALREADY_INITIALIZED
@ USART_MULTI_ERROR_NOT_INITIALIZED
@ USART_MULTI_ERROR_NOT_SUPPORTED
@ USART_MULTI_ERROR_BUFFER_FULL
@ USART_MULTI_SUCCESS
@ USART_MULTI_ERROR_BUSY
@ USART_MULTI_ERROR_TIMEOUT

◆ usart_multi_stop_bits_e

Stop bits.

Enumerator
USART_MULTI_STOP_BITS_1 

1 stop bit (default, 8N1)

USART_MULTI_STOP_BITS_2 

2 stop bits

Definition at line 92 of file usart_multi.h.

93{
usart_multi_stop_bits_e
Stop bits.
Definition usart_multi.h:93
@ USART_MULTI_STOP_BITS_1
Definition usart_multi.h:94
@ USART_MULTI_STOP_BITS_2
Definition usart_multi.h:95