MT2523 API Reference  LinkIt SDK v4
Enum

Overview

Enumerations

enum  hal_spi_slave_bit_order_t {
  HAL_SPI_SLAVE_LSB_FIRST = 0,
  HAL_SPI_SLAVE_MSB_FIRST = 1
}
 SPI slave transaction bit order definition. More...
 
enum  hal_spi_slave_early_miso_t {
  HAL_SPI_SLAVE_EARLY_MISO_DISABLE = 0,
  HAL_SPI_SLAVE_EARLY_MISO_ENABLE = 1
}
 The SPI slave sends MISO data half SCLK cycle early. More...
 
enum  hal_spi_slave_running_status_t {
  HAL_SPI_SLAVE_BUSY = 0,
  HAL_SPI_SLAVE_IDLE = 1
}
 SPI slave running status. More...
 
enum  hal_spi_slave_fsm_status_t {
  HAL_SPI_SLAVE_FSM_SUCCESS_OPERATION = 0x00,
  HAL_SPI_SLAVE_FSM_INVALID_OPERATION = 0x01,
  HAL_SPI_SLAVE_FSM_ERROR_PWROFF_AFTER_CR = 0x02,
  HAL_SPI_SLAVE_FSM_ERROR_PWROFF_AFTER_CW = 0x03,
  HAL_SPI_SLAVE_FSM_ERROR_CONTINOUS_CR = 0x04,
  HAL_SPI_SLAVE_FSM_ERROR_CR_AFTER_CW = 0x05,
  HAL_SPI_SLAVE_FSM_ERROR_CONTINOUS_CW = 0x06,
  HAL_SPI_SLAVE_FSM_ERROR_CW_AFTER_CR = 0x07,
  HAL_SPI_SLAVE_FSM_ERROR_WRITE_AFTER_CR = 0x08,
  HAL_SPI_SLAVE_FSM_ERROR_READ_AFTER_CW = 0x09
}
 SPI slave finite state machine status. More...
 
enum  hal_spi_slave_command_type_t {
  HAL_SPI_SLAVE_CMD_WS = 0,
  HAL_SPI_SLAVE_CMD_RS = 1,
  HAL_SPI_SLAVE_CMD_WR = 2,
  HAL_SPI_SLAVE_CMD_RD = 3,
  HAL_SPI_SLAVE_CMD_POWEROFF = 4,
  HAL_SPI_SLAVE_CMD_POWERON = 5,
  HAL_SPI_SLAVE_CMD_CW = 6,
  HAL_SPI_SLAVE_CMD_CR = 7
}
 The SPI slave command enum. More...
 
enum  hal_spi_slave_clock_polarity_t {
  HAL_SPI_SLAVE_CLOCK_POLARITY0 = 0,
  HAL_SPI_SLAVE_CLOCK_POLARITY1 = 1
}
 SPI slave clock polarity definition. More...
 
enum  hal_spi_slave_clock_phase_t {
  HAL_SPI_SLAVE_CLOCK_PHASE0 = 0,
  HAL_SPI_SLAVE_CLOCK_PHASE1 = 1
}
 SPI slave clock format definition. More...
 
enum  hal_spi_slave_status_t {
  HAL_SPI_SLAVE_STATUS_ERROR = -4,
  HAL_SPI_SLAVE_STATUS_ERROR_BUSY = -3,
  HAL_SPI_SLAVE_STATUS_ERROR_PORT = -2,
  HAL_SPI_SLAVE_STATUS_INVALID_PARAMETER = -1,
  HAL_SPI_SLAVE_STATUS_OK = 0
}
 SPI slave status. More...
 
enum  hal_spi_slave_port_t {
  HAL_SPI_SLAVE_0 = 0,
  HAL_SPI_SLAVE_MAX
}
 This enum defines the SPI slave port. More...
 

Enumeration Type Documentation

SPI slave transaction bit order definition.

Enumerator
HAL_SPI_SLAVE_LSB_FIRST 

Both send and receive data transfer is the LSB first.

HAL_SPI_SLAVE_MSB_FIRST 

Both send and receive data transfer is the MSB first.

SPI slave clock format definition.

Enumerator
HAL_SPI_SLAVE_CLOCK_PHASE0 

Clock format is 0.

HAL_SPI_SLAVE_CLOCK_PHASE1 

Clock format is 1.

SPI slave clock polarity definition.

Enumerator
HAL_SPI_SLAVE_CLOCK_POLARITY0 

Clock polarity is 0.

HAL_SPI_SLAVE_CLOCK_POLARITY1 

Clock polarity is 1.

The SPI slave command enum.

Enumerator
HAL_SPI_SLAVE_CMD_WS 

Write Status command.

HAL_SPI_SLAVE_CMD_RS 

Read Status command.

HAL_SPI_SLAVE_CMD_WR 

Write Data command.

HAL_SPI_SLAVE_CMD_RD 

Read Data command.

HAL_SPI_SLAVE_CMD_POWEROFF 

Power-Off command.

HAL_SPI_SLAVE_CMD_POWERON 

Power-On command.

HAL_SPI_SLAVE_CMD_CW 

Configure Write command.

HAL_SPI_SLAVE_CMD_CR 

Configure Read command.

The SPI slave sends MISO data half SCLK cycle early.

Enumerator
HAL_SPI_SLAVE_EARLY_MISO_DISABLE 

Disables send MISO data half SCLK cycle early.

HAL_SPI_SLAVE_EARLY_MISO_ENABLE 

Enables send MISO data half SCLK cycle early.

SPI slave finite state machine status.

Enumerator
HAL_SPI_SLAVE_FSM_SUCCESS_OPERATION 

SPI slave success operation.

HAL_SPI_SLAVE_FSM_INVALID_OPERATION 

SPI slave invalid operation.

HAL_SPI_SLAVE_FSM_ERROR_PWROFF_AFTER_CR 

SPI slave error, received Power-Off command after Configure Read command.

HAL_SPI_SLAVE_FSM_ERROR_PWROFF_AFTER_CW 

SPI slave error, received Power-Off command after Configure Write command.

HAL_SPI_SLAVE_FSM_ERROR_CONTINOUS_CR 

SPI slave error, received continous Configure Read command.

HAL_SPI_SLAVE_FSM_ERROR_CR_AFTER_CW 

SPI slave error, received Configure Read command after Configure Write command.

HAL_SPI_SLAVE_FSM_ERROR_CONTINOUS_CW 

SPI slave error, received continous Configure Write command.

HAL_SPI_SLAVE_FSM_ERROR_CW_AFTER_CR 

SPI slave error, received Configure Write command after Configure Read command.

HAL_SPI_SLAVE_FSM_ERROR_WRITE_AFTER_CR 

SPI slave error, received Write command after Configure Read command.

HAL_SPI_SLAVE_FSM_ERROR_READ_AFTER_CW 

SPI slave error, received Read command after Configure Write command.

This enum defines the SPI slave port.

This chip supports only one SPI slave port.

Enumerator
HAL_SPI_SLAVE_0 

SPI slave port 0.

HAL_SPI_SLAVE_MAX 

The total number of SPI slave ports (invalid SPI slave port number).

SPI slave running status.

Enumerator
HAL_SPI_SLAVE_BUSY 

The SPI slave is busy.

HAL_SPI_SLAVE_IDLE 

The SPI slave is idle.

SPI slave status.

Enumerator
HAL_SPI_SLAVE_STATUS_ERROR 

An error occurred during the SPI slave API call.

HAL_SPI_SLAVE_STATUS_ERROR_BUSY 

The SPI slave was busy during the SPI slave API call.

HAL_SPI_SLAVE_STATUS_ERROR_PORT 

Invalid SPI slave port number.

HAL_SPI_SLAVE_STATUS_INVALID_PARAMETER 

Invalid parameter.

HAL_SPI_SLAVE_STATUS_OK 

The SPI slave API call was successful.