31 lines
742 B
Markdown
31 lines
742 B
Markdown
|
|
# ist8310
|
|
|
|
## 使用示例
|
|
|
|
```c
|
|
IST8310_Init_Config_s ist8310_conf = {
|
|
.gpio_conf_exti = {
|
|
.exti_mode = GPIO_EXTI_MODE_RISING,
|
|
.GPIO_Pin = GPIO_PIN_3,
|
|
.GPIOx = GPIOG,
|
|
.gpio_model_callback = NULL,
|
|
},
|
|
.gpio_conf_rst = {
|
|
.exti_mode = GPIO_EXTI_MODE_NONE,
|
|
.GPIO_Pin = GPIO_PIN_6,
|
|
.GPIOx = GPIOG,
|
|
.gpio_model_callback = NULL,
|
|
},
|
|
.iic_config = {
|
|
.handle = &hi2c3,
|
|
.dev_address = IST8310_IIC_ADDRESS,
|
|
.work_mode = IIC_BLOCK_MODE,
|
|
},
|
|
};
|
|
|
|
IST8310Instance *asdf = IST8310Init(&ist8310_conf);
|
|
|
|
// 随后数据会被放到asdf.mag[i]中,每次数据准备好了就会触发int_ist引脚中断,继而启动iic通信读取数据并解析
|
|
```
|