#include <aos/device.h>
结构体 | |
struct | aos_spi_msg_t |
宏定义 | |
#define | AOS_SPI_MCFG_MODE_MASK ((uint32_t)0x3 << 0) |
#define | AOS_SPI_MCFG_MODE_0 ((uint32_t)0x0 << 0) |
#define | AOS_SPI_MCFG_MODE_1 ((uint32_t)0x1 << 0) |
#define | AOS_SPI_MCFG_MODE_2 ((uint32_t)0x2 << 0) |
#define | AOS_SPI_MCFG_MODE_3 ((uint32_t)0x3 << 0) |
#define | AOS_SPI_MCFG_WIDTH_MASK ((uint32_t)0x3 << 2) |
#define | AOS_SPI_MCFG_WIDTH_1 ((uint32_t)0x0 << 2) |
#define | AOS_SPI_MCFG_WIDTH_2 ((uint32_t)0x1 << 2) |
#define | AOS_SPI_MCFG_WIDTH_4 ((uint32_t)0x2 << 2) |
#define | AOS_SPI_MCFG_WIDTH_8 ((uint32_t)0x3 << 2) |
#define | AOS_SPI_MCFG_MSB_FIRST ((uint32_t)0x0 << 4) |
#define | AOS_SPI_MCFG_LSB_FIRST ((uint32_t)0x1 << 4) |
#define | AOS_SPI_MSG_INIT_VAL |
#define | aos_spi_msg_init(x) do { *(x) = (aos_spi_msg_t)AOS_SPI_MSG_INIT_VAL; } while (0) |
类型定义 | |
typedef aos_dev_ref_t | aos_spi_ref_t |
函数 | |
aos_status_t | aos_spi_get (aos_spi_ref_t *ref, uint32_t id) |
Get a SPI device. 更多... | |
void | aos_spi_put (aos_spi_ref_t *ref) |
Release a SPI device. 更多... | |
aos_status_t | aos_spi_transfer (aos_spi_ref_t *ref, const aos_spi_msg_t *msgs, size_t num_msgs) |
Synchronous SPI data transfer. 更多... | |