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

对移植者,用于对接 i2c 设置的参数。 更多...

#include <xf_hal_i2c.h>

_xf_hal_i2c_config_t 的协作图:
Collaboration graph

成员变量

uint32_t hosts: 1
 
uint32_t enable: 1
 
uint32_t address_width: 1
 
uint32_t address: 16
 
uint32_t mem_addr_en: 1
 
uint32_t mem_addr_width: 2
 
uint32_t reserve: 10
 
uint32_t mem_addr
 
uint32_t speed
 
uint32_t timeout_ms
 
xf_gpio_num_t scl_num
 
xf_gpio_num_t sda_num
 

详细描述

对移植者,用于对接 i2c 设置的参数。

在文件 xf_hal_i2c.h119 行定义.

结构体成员变量说明

◆ hosts

uint32_t hosts

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

在文件 xf_hal_i2c.h120 行定义.

◆ enable

uint32_t enable

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

在文件 xf_hal_i2c.h121 行定义.

◆ address_width

uint32_t address_width

地址宽度参数,0 为7bit,1 为10bit

在文件 xf_hal_i2c.h122 行定义.

◆ address

uint32_t address

地址参数,i2c 从机地址

在文件 xf_hal_i2c.h123 行定义.

◆ mem_addr_en

uint32_t mem_addr_en

内存地址启用参数,0为禁用,1为启用

在文件 xf_hal_i2c.h124 行定义.

◆ mem_addr_width

uint32_t mem_addr_width

内存地址宽度参数,可能为 8bit、16bit、24bit、32bit

在文件 xf_hal_i2c.h125 行定义.

◆ reserve

uint32_t reserve

在文件 xf_hal_i2c.h126 行定义.

◆ mem_addr

uint32_t mem_addr

内存地址参数,i2c 从机内存地址

在文件 xf_hal_i2c.h127 行定义.

◆ speed

uint32_t speed

速度参数,单位为 hz

在文件 xf_hal_i2c.h128 行定义.

◆ timeout_ms

uint32_t timeout_ms

超时参数,单位为 ms

在文件 xf_hal_i2c.h129 行定义.

◆ scl_num

xf_gpio_num_t scl_num

scl io 参数,设置 scl io 序号

在文件 xf_hal_i2c.h130 行定义.

◆ sda_num

xf_gpio_num_t sda_num

sda io 参数,设置 sda io 序号

在文件 xf_hal_i2c.h131 行定义.


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