generated from hulk/gd32e23x_template
在main函数中自动选择初始化软件或者硬件IIC。并且debug模式打印设备ID
This commit is contained in:
parent
0ac221ce6f
commit
19e73080e6
@ -61,9 +61,16 @@ int main(void) {
|
|||||||
|
|
||||||
// watchdog_init();
|
// watchdog_init();
|
||||||
/* configure I2C */
|
/* configure I2C */
|
||||||
|
#ifdef SOFTWARE_IIC
|
||||||
soft_i2c_config();
|
soft_i2c_config();
|
||||||
|
#else
|
||||||
|
i2c_config();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_VERBOES
|
||||||
ldc1612_iic_get_sensor_infomation();
|
ldc1612_iic_get_sensor_infomation();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* configure LDC1612 */
|
/* configure LDC1612 */
|
||||||
ldc1612_single_ch0_config();
|
ldc1612_single_ch0_config();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user