CMSIS Driver  Version 1.10 - Preliminary
Middleware Driver API for microcontroller peripherals
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
UART Interface

Driver API for Universal Asynchronous Receiver/Transmitter (Driver_UART.h) More...

Data Structures

struct  ARM_DRIVER_UART
 Access structure of the UART Driver. More...
 
struct  ARM_UART_CAPABILITIES
 UART Device Driver Capabilities. More...
 
struct  ARM_UART_COM_ERROR
 UART Communication Error. More...
 
struct  ARM_UART_MODEM_STATUS
 UART Modem Status. More...
 

Typedefs

typedef void(* ARM_UART_SignalEvent_t )(ARM_UART_EVENT event)
 Pointer to ARM_UART_SignalEvent : Signal UART Event.
 

Enumerations

enum  ARM_UART_PARITY {
  ARM_UART_PARITY_NONE,
  ARM_UART_PARITY_ODD,
  ARM_UART_PARITY_EVEN,
  ARM_UART_PARITY_MARK,
  ARM_UART_PARITY_SPACE
}
 UART Parity. More...
 
enum  ARM_UART_STOP_BITS {
  ARM_UART_STOP_BITS_1,
  ARM_UART_STOP_BITS_1_5,
  ARM_UART_STOP_BITS_2
}
 UART Stop Bits. More...
 
enum  ARM_UART_FLOW_CONTROL {
  ARM_UART_FLOW_CONTROL_NONE,
  ARM_UART_FLOW_CONTROL_RTS_CTS,
  ARM_UART_FLOW_CONTROL_XON_XOFF
}
 UART Flow Control. More...
 
enum  ARM_UART_MODEM_CONTROL {
  ARM_UART_RTS_CLEAR,
  ARM_UART_RTS_SET,
  ARM_UART_DTR_CLEAR,
  ARM_UART_DTR_SET
}
 UART Modem Control. More...
 
enum  ARM_UART_STATUS {
  ARM_UART_OK = 0,
  ARM_UART_ERROR = 1,
  ARM_UART_ERROR_BAUDRATE = 2,
  ARM_UART_ERROR_DATA_BITS = 3,
  ARM_UART_ERROR_PARITY = 4,
  ARM_UART_ERROR_STOP_BITS = 5,
  ARM_UART_ERROR_FLOW_CONTROL = 6
}
 UART Status of executed operation. More...
 
enum  ARM_UART_EVENT {
  ARM_UART_EVENT_TX_DONE = 0,
  ARM_UART_EVENT_TX_EMPTY = 1,
  ARM_UART_EVENT_RX_NOT_EMPTY = 2,
  ARM_UART_EVENT_RX_OVERRUN = 3,
  ARM_UART_EVENT_RX_THRESHOLD = 4,
  ARM_UART_EVENT_TX_THRESHOLD = 5,
  ARM_UART_EVENT_RX_TIMEOUT = 6,
  ARM_UART_EVENT_RX_BREAK = 7,
  ARM_UART_EVENT_RX_PARITY_ERROR = 8,
  ARM_UART_EVENT_RX_FRAMING_ERROR = 9,
  ARM_UART_EVENT_CTS = 10,
  ARM_UART_EVENT_DSR = 11,
  ARM_UART_EVENT_DCD = 12,
  ARM_UART_EVENT_RI = 13
}
 UART Event. More...
 

Functions

DRV_VERSION ARM_UART_GetVersion (void)
 Get driver version.
 
ARM_UART_CAPABILITIES ARM_UART_GetCapabilities (void)
 Get driver capabilities.
 
ARM_UART_STATUS ARM_UART_Initialize (ARM_UART_SignalEvent_t cb_event, uint32_t event_mask)
 Initialize UART Interface.
 
ARM_UART_STATUS ARM_UART_Uninitialize (void)
 De-initialize UART Interface.
 
ARM_UART_STATUS ARM_UART_PowerControl (ARM_POWER_STATE state)
 Control UART Interface Power.
 
ARM_UART_STATUS ARM_UART_Configure (uint32_t baudrate, uint8_t data_bits, ARM_UART_PARITY parity, ARM_UART_STOP_BITS stop_bits, ARM_UART_FLOW_CONTROL flow_control)
 Configure UART Interface.
 
int32_t ARM_UART_WriteData (const uint8_t *data, uint32_t size)
 Write data to UART transmitter.
 
int32_t ARM_UART_ReadData (uint8_t *data, uint32_t size)
 Read data from UART receiver.
 
int32_t ARM_UART_DataAvailable (void)
 Check available data in UART receiver.
 
bool ARM_UART_TxDone (void)
 Check if UART transmission is completed.
 
ARM_UART_STATUS ARM_UART_SetTxThreshold (uint32_t level)
 Set transmit threshold for UART_TX_THRESHOLD event.
 
ARM_UART_STATUS ARM_UART_SetRxThreshold (uint32_t level)
 Set receive threshold for UART_RX_THRESHOLD event.
 
ARM_UART_STATUS ARM_UART_FlushTxBuffer (void)
 Flush UART transmit buffer.
 
ARM_UART_STATUS ARM_UART_FlushRxBuffer (void)
 Flush UART receive buffer.
 
ARM_UART_COM_ERROR ARM_UART_GetComError (void)
 Get UART Communication errors.
 
ARM_UART_STATUS ARM_UART_SetComBreak (void)
 Suspend transmission and put UART Transmission line in a break state.
 
ARM_UART_STATUS ARM_UART_ClearComBreak (void)
 Resume transmission and put UART Transmission line in a non-break state.
 
ARM_UART_STATUS ARM_UART_SetModemControl (ARM_UART_MODEM_CONTROL control)
 Set UART Modem Control line state.
 
ARM_UART_MODEM_STATUS ARM_UART_GetModemStatus (void)
 Get UART Modem Status lines state.
 
void ARM_UART_SignalEvent (ARM_UART_EVENT event)
 Signal UART Event.
 

Description

Driver API for Universal Asynchronous Receiver/Transmitter (Driver_UART.h)

The Universal Asynchronous Receiver/Transmitter (UART) implements an asynchronous serial bus for exchanging data. Almost all microcontrollers have a serial interface (UART peripheral). A UART is a simple device to send data to a PC via a terminal emulation program (Hyperterm, TeraTerm) or to another microcontroller and can operate in both synchronous and asynchronous mode. A UART takes bytes of data and transmits the individual bits in a sequential mode. At the destination, a second UART reassembles the bits into complete bytes. Each UART contains a shift register for converting between serial and parallel transmission forms. Wikipedia offers more information about the Universal asynchronous receiver/transmitter.

UART API

The following header files define the Application Programming Interface (API) for the UART interface:

The driver implementation is a typical part of the Device Family Pack (DFP) that supports the peripherals of the microcontroller family.

Driver Functions

The driver functions are published in the access struct as explained in Driver Functions

A typical setup sequence for the driver is shown below:

Example Code:


Data Structure Documentation

struct ARM_DRIVER_UART

Access structure of the UART Driver.

The functions of the UART driver are accessed by function pointers exposed by this structure. Refer to Driver Functions for overview information.

Each instance of an UART interface provides such an access structure. The instance is identified by a postfix number in the symbol name of the access structure, for example:

  • ARM_DRIVER_UART0 is the name of the access struct of the first instance (no. 0).
  • ARM_DRIVER_UART1 is the name of the access struct of the second instance (no. 1).

A middleware configuration setting allows connecting the middleware to a specific driver instance ARM_DRIVER_UARTn. The default is 0, which connects a middleware to the first instance of a driver.

Data Fields

ARM_DRV_VERSION(* GetVersion )(void)
 Pointer to ARM_UART_GetVersion : Get driver version.
 
ARM_UART_CAPABILITIES(* GetCapabilities )(void)
 Pointer to ARM_UART_GetCapabilities : Get driver capabilities.
 
ARM_UART_STATUS(* Initialize )(ARM_UART_SignalEvent_t cb_event, uint32_t event_mask)
 Pointer to ARM_UART_Initialize : Initialize UART Interface.
 
ARM_UART_STATUS(* Uninitialize )(void)
 Pointer to ARM_UART_Uninitialize : De-initialize UART Interface.
 
ARM_UART_STATUS(* PowerControl )(ARM_POWER_STATE state)
 Pointer to ARM_UART_PowerControl : Control UART Interface Power.
 
ARM_UART_STATUS(* Configure )(uint32_t baudrate, uint8_t data_bits, ARM_UART_PARITY parity, ARM_UART_STOP_BITS stop_bits, ARM_UART_FLOW_CONTROL flow_control)
 Pointer to ARM_UART_Configure : Configure UART Interface.
 
int32_t(* WriteData )(const uint8_t *data, uint32_t size)
 Pointer to ARM_UART_WriteData : Write data to UART transmitter.
 
int32_t(* ReadData )(uint8_t *data, uint32_t size)
 Pointer to ARM_UART_ReadData : Read data from UART receiver.
 
int32_t(* DataAvailable )(void)
 Pointer to ARM_UART_DataAvailable : Check available data in UART receiver.
 
bool(* TxDone )(void)
 Pointer to ARM_UART_TxDone : Check if UART transmission is completed.
 
ARM_UART_STATUS(* SetTxThreshold )(uint32_t level)
 Pointer to ARM_UART_SetTxThreshold : Set transmit threshold.
 
ARM_UART_STATUS(* SetRxThreshold )(uint32_t level)
 Pointer to ARM_UART_SetRxThreshold : Set receive threshold.
 
ARM_UART_STATUS(* FlushTxBuffer )(void)
 Pointer to ARM_UART_FlushTxBuffer : Flush UART transmit buffer.
 
ARM_UART_STATUS(* FlushRxBuffer )(void)
 Pointer to ARM_UART_FlushRxBuffer : Flush UART receive buffer.
 
ARM_UART_COM_ERROR(* GetComError )(void)
 Pointer to ARM_UART_GetComError : Get UART Communication errors.
 
ARM_UART_STATUS(* SetComBreak )(void)
 Pointer to ARM_UART_SetComBreak : Suspend transmission and put UART Transmission line in a break state.
 
ARM_UART_STATUS(* ClearComBreak )(void)
 Pointer to ARM_UART_ClearComBreak : Resume transmission and put UART Transmission line in a non-break state.
 
ARM_UART_STATUS(* SetModemControl )(ARM_UART_MODEM_CONTROL control)
 Pointer to ARM_UART_SetModemControl : Set UART Modem Control line state.
 
ARM_UART_MODEM_STATUS(* GetModemStatus )(void)
 Pointer to ARM_UART_GetModemStatus : Get UART Modem Status lines state.
 

Field Documentation

ARM_UART_STATUS(* ClearComBreak)(void)

Pointer to ARM_UART_ClearComBreak : Resume transmission and put UART Transmission line in a non-break state.

ARM_UART_STATUS(* Configure)(uint32_t baudrate, uint8_t data_bits, ARM_UART_PARITY parity, ARM_UART_STOP_BITS stop_bits, ARM_UART_FLOW_CONTROL flow_control)

Pointer to ARM_UART_Configure : Configure UART Interface.

int32_t(* DataAvailable)(void)

Pointer to ARM_UART_DataAvailable : Check available data in UART receiver.

ARM_UART_STATUS(* FlushRxBuffer)(void)

Pointer to ARM_UART_FlushRxBuffer : Flush UART receive buffer.

ARM_UART_STATUS(* FlushTxBuffer)(void)

Pointer to ARM_UART_FlushTxBuffer : Flush UART transmit buffer.

ARM_UART_CAPABILITIES(* GetCapabilities)(void)

Pointer to ARM_UART_GetCapabilities : Get driver capabilities.

ARM_UART_COM_ERROR(* GetComError)(void)

Pointer to ARM_UART_GetComError : Get UART Communication errors.

ARM_UART_MODEM_STATUS(* GetModemStatus)(void)

Pointer to ARM_UART_GetModemStatus : Get UART Modem Status lines state.

ARM_DRV_VERSION(* GetVersion)(void)

Pointer to ARM_UART_GetVersion : Get driver version.

ARM_UART_STATUS(* Initialize)(ARM_UART_SignalEvent_t cb_event, uint32_t event_mask)

Pointer to ARM_UART_Initialize : Initialize UART Interface.

ARM_UART_STATUS(* PowerControl)(ARM_POWER_STATE state)

Pointer to ARM_UART_PowerControl : Control UART Interface Power.

int32_t(* ReadData)(uint8_t *data, uint32_t size)

Pointer to ARM_UART_ReadData : Read data from UART receiver.

ARM_UART_STATUS(* SetComBreak)(void)

Pointer to ARM_UART_SetComBreak : Suspend transmission and put UART Transmission line in a break state.

ARM_UART_STATUS(* SetModemControl)(ARM_UART_MODEM_CONTROL control)

Pointer to ARM_UART_SetModemControl : Set UART Modem Control line state.

ARM_UART_STATUS(* SetRxThreshold)(uint32_t level)

Pointer to ARM_UART_SetRxThreshold : Set receive threshold.

ARM_UART_STATUS(* SetTxThreshold)(uint32_t level)

Pointer to ARM_UART_SetTxThreshold : Set transmit threshold.

bool(* TxDone)(void)

Pointer to ARM_UART_TxDone : Check if UART transmission is completed.

ARM_UART_STATUS(* Uninitialize)(void)

Pointer to ARM_UART_Uninitialize : De-initialize UART Interface.

int32_t(* WriteData)(const uint8_t *data, uint32_t size)

Pointer to ARM_UART_WriteData : Write data to UART transmitter.

struct ARM_UART_CAPABILITIES

UART Device Driver Capabilities.

An UART driver can be implemented with different capabilities. The bitfield members of this struct encode the capabilities implemented by this driver.

Returned by:

Data Fields
uint32_t cts: 1 CTS Line: 0=not available, 1=available.
uint32_t cts_event: 1 Signal CTS change event: ARM_UART_EVENT_CTS.
uint32_t dcd: 1 DCD Line: 0=not available, 1=available.
uint32_t dcd_event: 1 Signal DCD change event: ARM_UART_EVENT_DCD.
uint32_t dsr: 1 DSR Line: 0=not available, 1=available.
uint32_t dsr_event: 1 Signal DSR change event: ARM_UART_EVENT_DSR.
uint32_t reserved: 23 reserved for future use
uint32_t ri: 1 RI Line: 0=not available, 1=available.
uint32_t ri_event: 1 Signal RI change event: ARM_UART_EVENT_RI.
uint32_t rx_buffer_size Receive Buffer Size.
uint32_t rx_timeout_event: 1 Signal receive character timeout event: ARM_UART_EVENT_RX_TIMEOUT.
uint32_t tx_buffer_size Transmit Buffer Size.
struct ARM_UART_COM_ERROR

UART Communication Error.

Provides standardized values for UART communication errors.

Returned by:

Data Fields
uint8_t rx_break: 1 Break detected on receive.
uint8_t rx_framing_error: 1 Framing error detected on receive.
uint8_t rx_overrun: 1 Receive buffer overrun.
uint8_t rx_parity_error: 1 Parity error detected on receive.
struct ARM_UART_MODEM_STATUS

UART Modem Status.

Provides standardized values for the modem status.

Returned by:

Data Fields
uint8_t cts: 1 CTS state (1 - Active, 0 - Inactive)
uint8_t dcd: 1 DCD state (1 - Active, 0 - Inactive)
uint8_t dsr: 1 DSR state (1 - Active, 0 - Inactive)
uint8_t ri: 1 RI state (1 - Active, 0 - Inactive)

Typedef Documentation

ARM_UART_SignalEvent_t

Pointer to ARM_UART_SignalEvent : Signal UART Event.

Provides the typedef for the callback function ARM_UART_SignalEvent.

Parameter for:

Enumeration Type Documentation

UART Event.

Provides values for for the ARM_UART_SignalEvent callback function (which is registered by the function ARM_UART_Initialize). The function ARM_UART_GetCapabilities returns information about the implemented callback events in a driver.

Enumerator:
ARM_UART_EVENT_TX_DONE 

Transmit completed.

ARM_UART_EVENT_TX_EMPTY 

Transmit buffer empty.

ARM_UART_EVENT_RX_NOT_EMPTY 

Receive buffer not empty.

ARM_UART_EVENT_RX_OVERRUN 

Receive buffer overrun detected.

ARM_UART_EVENT_RX_THRESHOLD 

Receive buffer threshold reached.

ARM_UART_EVENT_TX_THRESHOLD 

Transmit buffer threshold reached.

ARM_UART_EVENT_RX_TIMEOUT 

Receive character timeout.

ARM_UART_EVENT_RX_BREAK 

Break detected on receive.

ARM_UART_EVENT_RX_PARITY_ERROR 

Parity error detected on receive.

ARM_UART_EVENT_RX_FRAMING_ERROR 

Framing error detected on receive.

ARM_UART_EVENT_CTS 

CTS state changed.

ARM_UART_EVENT_DSR 

DSR state changed.

ARM_UART_EVENT_DCD 

DCD state changed.

ARM_UART_EVENT_RI 

RI state changed.

UART Flow Control.

Provides standardized values for setting the flow control of an UART.

Parameter for:

Enumerator:
ARM_UART_FLOW_CONTROL_NONE 

No Flow Control.

ARM_UART_FLOW_CONTROL_RTS_CTS 

RTS/CTS Flow Control.

ARM_UART_FLOW_CONTROL_XON_XOFF 

XON/XOFF Flow Control.

UART Modem Control.

Provides standardized values for controlling the modem.

Returned by:

Enumerator:
ARM_UART_RTS_CLEAR 

Deactivate RTS.

ARM_UART_RTS_SET 

Activate RTS.

ARM_UART_DTR_CLEAR 

Deactivate DTR.

ARM_UART_DTR_SET 

Activate DTR.

UART Parity.

Provides standardized values for setting the parity bit of an UART.

Parameter for:

Enumerator:
ARM_UART_PARITY_NONE 

No Parity.

ARM_UART_PARITY_ODD 

Odd Parity.

ARM_UART_PARITY_EVEN 

Even Parity.

ARM_UART_PARITY_MARK 

Mark (1) Parity.

ARM_UART_PARITY_SPACE 

Space (0) Parity.

UART Status of executed operation.

Defines status and error codes returned by most of the MCI driver functions.

Returned by:

Enumerator:
ARM_UART_OK 

Operation succeeded.

ARM_UART_ERROR 

Unspecified error.

ARM_UART_ERROR_BAUDRATE 

Specified baudrate not supported.

ARM_UART_ERROR_DATA_BITS 

Specified number of Data bits not supported.

ARM_UART_ERROR_PARITY 

Specified Parity not supported.

ARM_UART_ERROR_STOP_BITS 

Specified Stop bits not supported.

ARM_UART_ERROR_FLOW_CONTROL 

Specified Flow Control not supported.

UART Stop Bits.

Provides standardized values for setting the stop bits of an UART.

Parameter for:

Enumerator:
ARM_UART_STOP_BITS_1 

1 Stop bit

ARM_UART_STOP_BITS_1_5 

1.5 Stop bits

ARM_UART_STOP_BITS_2 

2 Stop bits

Function Documentation

ARM_UART_STATUS ARM_UART_ClearComBreak ( void  )

Resume transmission and put UART Transmission line in a non-break state.

Returns
execution status ARM_UART_STATUS

Resume transmission and put the UART Transmission line in a non-break state.

ARM_UART_STATUS ARM_UART_Configure ( uint32_t  baudrate,
uint8_t  data_bits,
ARM_UART_PARITY  parity,
ARM_UART_STOP_BITS  stop_bits,
ARM_UART_FLOW_CONTROL  flow_control 
)

Configure UART Interface.

Parameters
[in]baudrateRequested baudrate in bits/s
[in]data_bitsNumber of data bits
[in]parityARM_UART_PARITY
[in]stop_bitsARM_UART_STOP_BITS
[in]flow_controlARM_UART_FLOW_CONTROL
Returns
execution status ARM_UART_STATUS

Configure the UART Interface.

int32_t ARM_UART_DataAvailable ( void  )

Check available data in UART receiver.

Returns
number of data bytes in receive buffer or execution status
  • value >= 0: number of data bytes in receive buffer
  • value < 0: error occurred, -value is execution status as defined with ARM_UART_STATUS

Check available data available in the UART receiver.

ARM_UART_STATUS ARM_UART_FlushRxBuffer ( void  )

Flush UART receive buffer.

Returns
execution status ARM_UART_STATUS

Flush the UART receive buffer.

ARM_UART_STATUS ARM_UART_FlushTxBuffer ( void  )

Flush UART transmit buffer.

Returns
execution status ARM_UART_STATUS

Flush the UART transmit buffer.

ARM_UART_CAPABILITIES ARM_UART_GetCapabilities ( void  )

Get driver capabilities.

Returns
ARM_UART_CAPABILITIES

Retrieves information about capabilities in this driver implementation. The bitfield members of the struct ARM_UART_CAPABILITIES encode various capabilities, for example if a hardware is capable to create signal events using the ARM_UART_SignalEvent callback function.

Example:

extern ARM_DRIVER_UART ARM_Driver_UART0;
ARM_DRIVER_UART *drv_info;
void read_capabilities (void) {
ARM_UART_CAPABILITIES drv_capabilities;
drv_info = &ARM_Driver_UART;
drv_capablilities = drv_info->GetCapabilities ();
// interrogate capabilities
}
ARM_UART_COM_ERROR ARM_UART_GetComError ( void  )

Get UART Communication errors.

Returns
ARM_UART_COM_ERROR

Get any UART Communication errors.

ARM_UART_MODEM_STATUS ARM_UART_GetModemStatus ( void  )

Get UART Modem Status lines state.

Returns
modem status ARM_UART_MODEM_STATUS

Get the UART Modem Status lines state.

ARM_DRV_VERSION ARM_UART_GetVersion ( void  )

Get driver version.

Returns
ARM_DRV_VERSION
ARM_UART_STATUS ARM_UART_Initialize ( ARM_UART_SignalEvent_t  cb_event,
uint32_t  event_mask 
)

Initialize UART Interface.

Parameters
[in]cb_eventPointer to ARM_UART_SignalEvent
[in]event_maskEvents that are reported through callbacks
Returns
execution status ARM_UART_STATUS

The function initializes the UART interface. It is called when the middleware component starts operation.

The function performs the following operations:

  • Initializes the resources needed for the UART interface.
  • Registers the ARM_UART_SignalEvent callback function.
  • Sets the peripheral to ARM_POWER_LOW power mode.
  • Disables the UART receive and transmit engine.

The parameter cb_event is a pointer to the ARM_UART_SignalEvent callback function; use a NULL pointer when no callback signals are required.

The parameter event_mask configures the events that get reported through callbacks.

Example:

ARM_UART_STATUS ARM_UART_PowerControl ( ARM_POWER_STATE  state)

Control UART Interface Power.

Parameters
[in]statePower state
Returns
execution status ARM_UART_STATUS

Control the UART Interface Power.

int32_t ARM_UART_ReadData ( uint8_t *  data,
uint32_t  size 
)

Read data from UART receiver.

Parameters
[out]dataPointer to buffer for data read from UART receiver
[in]sizeData buffer size in bytes
Returns
number of data bytes read or execution status
  • value >= 0: number of data bytes read
  • value < 0: error occurred, -value is execution status as defined with ARM_UART_STATUS

Read data from an UART receiver.

ARM_UART_STATUS ARM_UART_SetComBreak ( void  )

Suspend transmission and put UART Transmission line in a break state.

Returns
execution status ARM_UART_STATUS

Suspend transmission and put the UART Transmission line in a break state.

ARM_UART_STATUS ARM_UART_SetModemControl ( ARM_UART_MODEM_CONTROL  control)

Set UART Modem Control line state.

Parameters
[in]controlARM_UART_MODEM_CONTROL
Returns
execution status ARM_UART_STATUS

Set the UART Modem Control line state.

ARM_UART_STATUS ARM_UART_SetRxThreshold ( uint32_t  level)

Set receive threshold for UART_RX_THRESHOLD event.

Parameters
[in]levelNumber of character in receive buffer
Returns
execution status ARM_UART_STATUS

Set the receive threshold.

ARM_UART_STATUS ARM_UART_SetTxThreshold ( uint32_t  level)

Set transmit threshold for UART_TX_THRESHOLD event.

Parameters
[in]levelNumber of character in transmit buffer
Returns
execution status ARM_UART_STATUS

Set the transmission threshold.

void ARM_UART_SignalEvent ( ARM_UART_EVENT  event)

Signal UART Event.

Parameters
[in]eventARM_UART_EVENT
Returns
none

Signal back the UART Event.

bool ARM_UART_TxDone ( void  )

Check if UART transmission is completed.

Returns
transmitter completion status
  • true transmission done
  • false transmission in progress

Check if the UART transmission is completed.

ARM_UART_STATUS ARM_UART_Uninitialize ( void  )

De-initialize UART Interface.

Returns
execution status ARM_UART_STATUS

The function ARM_UART_Uninitialize de-initializes the resources of UART interface and sets the peripheral to ARM_POWER_OFF power mode.

It is called when the middleware component stops operation and releases the software resources used by the interface.

int32_t ARM_UART_WriteData ( const uint8_t *  data,
uint32_t  size 
)

Write data to UART transmitter.

Parameters
[in]dataPointer to buffer with data to write to UART transmitter
[in]sizeData buffer size in bytes
Returns
number of data bytes written or execution status
  • value >= 0: number of data bytes written
  • value < 0: error occurred, -value is execution status as defined with ARM_UART_STATUS

Write data to the UART transmitter.