mirror of
https://gitee.com/dlmu-cone/half-steering-basic-framework
synced 2026-10-23 17:42:20 +08:00
first commit
This commit is contained in:
30
modules/ist8310/ist8310.md
Normal file
30
modules/ist8310/ist8310.md
Normal file
@@ -0,0 +1,30 @@
|
||||
|
||||
# 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通信读取数据并解析
|
||||
```
|
||||
Reference in New Issue
Block a user