添加了ist8310磁力计的支持,同时修复了gpio初始化先于exti的bug

This commit is contained in:
NeoZng
2023-02-03 15:25:58 +08:00
parent 73cdc66de5
commit 1262f9a516
19 changed files with 326 additions and 124 deletions

View File

@@ -0,0 +1,27 @@
使用示例
```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]中
```