XFusion API v1.3.0
载入中...
搜索中...
未找到
_xf_hal_spi_config_t结构体 参考

用于对接 SPI 设置的参数。 更多...

#include <xf_hal_spi.h>

_xf_hal_spi_config_t 的协作图:
Collaboration graph

成员变量

uint32_t hosts: 1
 
uint32_t enable: 1
 
uint32_t bit_order: 1
 
uint32_t mode: 2
 
uint32_t data_width: 2
 
uint32_t reserve: 25
 
uint32_t timeout_ms
 
uint32_t speed
 
xf_hal_spi_gpio_t gpio
 
xf_hal_spi_callback_t prev_cb
 
xf_hal_spi_callback_t post_cb
 

详细描述

用于对接 SPI 设置的参数。

注解
普通用户可忽略,移植者需注意。

在文件 xf_hal_spi.h169 行定义.

结构体成员变量说明

◆ hosts

uint32_t hosts

主从参数,0 为主机,1 为从机,见 xf_hal_spi_hosts_t

在文件 xf_hal_spi.h170 行定义.

◆ enable

uint32_t enable

启用参数,0 为禁用,1 为启用

在文件 xf_hal_spi.h171 行定义.

◆ bit_order

uint32_t bit_order

字节序参数,0 为低位在前,1 为高位在前, 见 xf_hal_spi_bit_order_t

在文件 xf_hal_spi.h172 行定义.

◆ mode

uint32_t mode

模式参数,设置时钟极性和时钟相位,见 xf_hal_spi_mode_t

在文件 xf_hal_spi.h174 行定义.

◆ data_width

uint32_t data_width

传输数据位宽参数,0 为 8bit,1 为 16 bit,2 为 32 bit, 见 xf_hal_spi_data_width_t

在文件 xf_hal_spi.h175 行定义.

◆ reserve

uint32_t reserve

在文件 xf_hal_spi.h177 行定义.

◆ timeout_ms

uint32_t timeout_ms

传输超时参数,单位为 ms

在文件 xf_hal_spi.h178 行定义.

◆ speed

uint32_t speed

传输速度参数,单位为 hz

在文件 xf_hal_spi.h179 行定义.

◆ gpio

传输 IO 参数

在文件 xf_hal_spi.h180 行定义.

◆ prev_cb

传输前回调参数

在文件 xf_hal_spi.h181 行定义.

◆ post_cb

传输后回调参数

在文件 xf_hal_spi.h182 行定义.


该结构体的文档由以下文件生成: