MT7697 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 the 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 the 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 the 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 the 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 the UART event when an interrupt occurs. More...
 
enum  hal_uart_port_t {
  HAL_UART_0 = 0,
  HAL_UART_1 = 1,
  HAL_UART_MAX
}
 UART port index We have total 2 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 the 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.

HAL_UART_EVENT_READY_TO_WRITE 

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

This enum defines parity of the 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 We have total 2 UART ports.

And UART0 and UART1 support hardware flow control.

UART port hardware flow control
UART0 V
UART1 V
Enumerator
HAL_UART_0 

uart port0

HAL_UART_1 

uart port1

This enum defines return status of the UART HAL public API.

User should check return value after calling these APIs.

Enumerator
HAL_UART_STATUS_ERROR_PARAMETER 

Invalid user input parameter.

HAL_UART_STATUS_ERROR_BUSY 

UART port is currently in use.

HAL_UART_STATUS_ERROR_UNINITIALIZED 

UART port has not been initialized.

HAL_UART_STATUS_ERROR 

UART driver detected a common error.

HAL_UART_STATUS_OK 

UART function executed successfully.

This enum defines stop bit of the 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 bits per frame.

This enum defines word length of the UART frame.

Enumerator
HAL_UART_WORD_LENGTH_5 

Defines UART word length as 5 bits per frame.

HAL_UART_WORD_LENGTH_6 

Defines UART word length as 6 bits per frame.

HAL_UART_WORD_LENGTH_7 

Defines UART word length as 7 bits per frame.

HAL_UART_WORD_LENGTH_8 

Defines UART word length as 8 bits per frame.