MT2523 API Reference  LinkIt SDK v4
Enum

Overview

Enumerations

enum  hal_uart_baudrate_t {
  HAL_UART_BAUDRATE_110 = 0,
  HAL_UART_BAUDRATE_300 = 1,
  HAL_UART_BAUDRATE_1200 = 2,
  HAL_UART_BAUDRATE_2400 = 3,
  HAL_UART_BAUDRATE_4800 = 4,
  HAL_UART_BAUDRATE_9600 = 5,
  HAL_UART_BAUDRATE_19200 = 6,
  HAL_UART_BAUDRATE_38400 = 7,
  HAL_UART_BAUDRATE_57600 = 8,
  HAL_UART_BAUDRATE_115200 = 9,
  HAL_UART_BAUDRATE_230400 = 10,
  HAL_UART_BAUDRATE_460800 = 11,
  HAL_UART_BAUDRATE_921600 = 12,
  HAL_UART_BAUDRATE_MAX
}
 This enum defines baud rate of the UART frame. More...
 
enum  hal_uart_word_length_t {
  HAL_UART_WORD_LENGTH_5 = 0,
  HAL_UART_WORD_LENGTH_6 = 1,
  HAL_UART_WORD_LENGTH_7 = 2,
  HAL_UART_WORD_LENGTH_8 = 3
}
 This enum defines word length of UART frame. More...
 
enum  hal_uart_stop_bit_t {
  HAL_UART_STOP_BIT_1 = 0,
  HAL_UART_STOP_BIT_2 = 1
}
 This enum defines stop bit of UART frame. More...
 
enum  hal_uart_parity_t {
  HAL_UART_PARITY_NONE = 0,
  HAL_UART_PARITY_ODD = 1,
  HAL_UART_PARITY_EVEN = 2
}
 This enum defines parity of UART frame. More...
 
enum  hal_uart_status_t {
  HAL_UART_STATUS_ERROR_PARAMETER = -4,
  HAL_UART_STATUS_ERROR_BUSY = -3,
  HAL_UART_STATUS_ERROR_UNINITIALIZED = -2,
  HAL_UART_STATUS_ERROR = -1,
  HAL_UART_STATUS_OK = 0
}
 This enum defines return status of UART HAL public API. More...
 
enum  hal_uart_callback_event_t {
  HAL_UART_EVENT_TRANSACTION_ERROR = -1,
  HAL_UART_EVENT_READY_TO_READ = 1,
  HAL_UART_EVENT_READY_TO_WRITE = 2
}
 This enum defines UART event when an interrupt occurs. More...
 
enum  hal_uart_port_t {
  HAL_UART_0 = 0,
  HAL_UART_1 = 1,
  HAL_UART_2 = 2,
  HAL_UART_3 = 3,
  HAL_UART_MAX
}
 UART port index There are total of four UART ports. More...
 

Enumeration Type Documentation

This enum defines baud rate of the UART frame.

Enumerator
HAL_UART_BAUDRATE_110 

Defines UART baudrate as 110 bps.

HAL_UART_BAUDRATE_300 

Defines UART baudrate as 300 bps.

HAL_UART_BAUDRATE_1200 

Defines UART baudrate as 1200 bps.

HAL_UART_BAUDRATE_2400 

Defines UART baudrate as 2400 bps.

HAL_UART_BAUDRATE_4800 

Defines UART baudrate as 4800 bps.

HAL_UART_BAUDRATE_9600 

Defines UART baudrate as 9600 bps.

HAL_UART_BAUDRATE_19200 

Defines UART baudrate as 19200 bps.

HAL_UART_BAUDRATE_38400 

Defines UART baudrate as 38400 bps.

HAL_UART_BAUDRATE_57600 

Defines UART baudrate as 57600 bps.

HAL_UART_BAUDRATE_115200 

Defines UART baudrate as 115200 bps.

HAL_UART_BAUDRATE_230400 

Defines UART baudrate as 230400 bps.

HAL_UART_BAUDRATE_460800 

Defines UART baudrate as 460800 bps.

HAL_UART_BAUDRATE_921600 

Defines UART baudrate as 921600 bps.

HAL_UART_BAUDRATE_MAX 

Defines maximum enum value of UART baudrate.

This enum defines UART event when an interrupt occurs.

Enumerator
HAL_UART_EVENT_TRANSACTION_ERROR 

Indicates if there is a transaction error when receiving data.

HAL_UART_EVENT_READY_TO_READ 

Indicates if there is enough data available in the RX buffer for the user to read from it.

HAL_UART_EVENT_READY_TO_WRITE 

Indicates if there is enough free space available in the TX buffer for the user to write into it.

This enum defines parity of UART frame.

Enumerator
HAL_UART_PARITY_NONE 

Defines UART parity as none.

HAL_UART_PARITY_ODD 

Defines UART parity as odd.

HAL_UART_PARITY_EVEN 

Defines UART parity as even.

UART port index There are total of four UART ports.

Only UART0 and UART1 support hardware flow control.

UART port Hardware Flow Control
UART0 V
UART1 V
UART2 X
UART3 X
Enumerator
HAL_UART_0 

UART port 0.

HAL_UART_1 

UART port 1.

HAL_UART_2 

UART port 2.

HAL_UART_3 

UART port 3.

HAL_UART_MAX 

The total number of UART ports (invalid UART port number).

This enum defines return status of UART HAL public API.

User should check return value after calling those APIs.

Enumerator
HAL_UART_STATUS_ERROR_PARAMETER 

Indicates user's parameter is invalid.

HAL_UART_STATUS_ERROR_BUSY 

Indicates UART port is currently used by other user.

HAL_UART_STATUS_ERROR_UNINITIALIZED 

Indicates UART port has not been initialized.

HAL_UART_STATUS_ERROR 

Indicates UART driver detected a common error.

HAL_UART_STATUS_OK 

Indicates UART function executed successfully.

This enum defines stop bit of UART frame.

Enumerator
HAL_UART_STOP_BIT_1 

Defines UART stop bit as 1 bit per frame.

HAL_UART_STOP_BIT_2 

Defines UART stop bit as 2 bit per frame.

This enum defines word length of UART frame.

Enumerator
HAL_UART_WORD_LENGTH_5 

Defines UART word length as 5 bit per frame.

HAL_UART_WORD_LENGTH_6 

Defines UART word length as 6 bit per frame.

HAL_UART_WORD_LENGTH_7 

Defines UART word length as 7 bit per frame.

HAL_UART_WORD_LENGTH_8 

Defines UART word length as 8 bit per frame.