MT7687 API Reference  LinkIt SDK v4

Overview

Enumerations

enum  hal_spi_master_clock_polarity_t {
  HAL_SPI_MASTER_CLOCK_POLARITY0 = 0,
  HAL_SPI_MASTER_CLOCK_POLARITY1 = 1
}
 SPI master clock polarity definition. More...
 
enum  hal_spi_master_clock_phase_t {
  HAL_SPI_MASTER_CLOCK_PHASE0 = 0,
  HAL_SPI_MASTER_CLOCK_PHASE1 = 1
}
 SPI master clock format definition. More...
 
enum  hal_spi_master_bit_order_t {
  HAL_SPI_MASTER_LSB_FIRST = 0,
  HAL_SPI_MASTER_MSB_FIRST = 1
}
 SPI master transaction bit order definition. More...
 
enum  hal_spi_master_status_t {
  HAL_SPI_MASTER_STATUS_ERROR = -4,
  HAL_SPI_MASTER_STATUS_ERROR_BUSY = -3,
  HAL_SPI_MASTER_STATUS_ERROR_PORT = -2,
  HAL_SPI_MASTER_STATUS_INVALID_PARAMETER = -1,
  HAL_SPI_MASTER_STATUS_OK = 0
}
 SPI master status. More...
 
enum  hal_spi_master_running_status_t {
  HAL_SPI_MASTER_BUSY = 0,
  HAL_SPI_MASTER_IDLE = 1
}
 SPI master running status. More...
 
enum  hal_spi_master_port_t {
  HAL_SPI_MASTER_0 = 0,
  HAL_SPI_MASTER_MAX
}
 This enum defines the SPI master port. More...
 
enum  hal_spi_master_slave_port_t {
  HAL_SPI_MASTER_SLAVE_0 = 0,
  HAL_SPI_MASTER_SLAVE_1 = 1,
  HAL_SPI_MASTER_SLAVE_MAX
}
 selection of spi slave device connected to which cs pin of spi master More...
 

Enumeration Type Documentation

SPI master transaction bit order definition.

Enumerator
HAL_SPI_MASTER_LSB_FIRST 

Both send and receive data transfer LSB first.

HAL_SPI_MASTER_MSB_FIRST 

Both send and receive data transfer MSB first.

SPI master clock format definition.

Enumerator
HAL_SPI_MASTER_CLOCK_PHASE0 

Clock format is 0.

HAL_SPI_MASTER_CLOCK_PHASE1 

Clock format is 1.

SPI master clock polarity definition.

Enumerator
HAL_SPI_MASTER_CLOCK_POLARITY0 

Clock polarity is 0.

HAL_SPI_MASTER_CLOCK_POLARITY1 

Clock polarity is 1.

This enum defines the SPI master port.

This chip total has 1 SPI master port

Enumerator
HAL_SPI_MASTER_0 

spi master port 0

HAL_SPI_MASTER_MAX 

spi master max port number<invalid>

SPI master running status.

Enumerator
HAL_SPI_MASTER_BUSY 

SPI master busy.

HAL_SPI_MASTER_IDLE 

SPI master not busy, in idle state.

selection of spi slave device connected to which cs pin of spi master

Enumerator
HAL_SPI_MASTER_SLAVE_0 

spi slave device connect to spi master cs0 pin

HAL_SPI_MASTER_SLAVE_1 

spi slave device connect to spi master cs1 pin

HAL_SPI_MASTER_SLAVE_MAX 

spi master max cs pin number<invalid>

SPI master status.

Enumerator
HAL_SPI_MASTER_STATUS_ERROR 

SPI master function error.

HAL_SPI_MASTER_STATUS_ERROR_BUSY 

SPI master function error busy.

HAL_SPI_MASTER_STATUS_ERROR_PORT 

SPI master error port.

HAL_SPI_MASTER_STATUS_INVALID_PARAMETER 

SPI master error invalid parameter.

HAL_SPI_MASTER_STATUS_OK 

SPI master function OK.