generated from hulk/gd32e23x_template
Complete data reading
This commit is contained in:
16
src/main.c
16
src/main.c
@@ -39,9 +39,6 @@ void led_config(void) {
|
||||
nvic_irq_enable(LED_IRQ, 2);
|
||||
}
|
||||
|
||||
uint8_t RCOUNT_ALL[3] = {SET_CONVERSION_TIME_REG_START, 0x05, 0x36};
|
||||
uint8_t SETTLECOUNT0_ALL[3] = {SET_CONVERSION_TIME_REG_START, 0x05, 0x36};
|
||||
|
||||
/*!
|
||||
\brief main function
|
||||
\param[in] none
|
||||
@@ -53,21 +50,20 @@ int main(void) {
|
||||
systick_config();
|
||||
RS485_config();
|
||||
led_config();
|
||||
I2C_config();
|
||||
i2c_gpio_config();
|
||||
i2c_config();
|
||||
|
||||
printf("\r\n");
|
||||
printf("XLSW-3DP-LDC1612! V0.0.1\r\n");
|
||||
printf("\r\n");
|
||||
uint32_t raw_value = 0;
|
||||
|
||||
delay_ms(500);
|
||||
ldc1612_iic_get_sensor_infomation();
|
||||
|
||||
ldc1612_single_ch0_config();
|
||||
|
||||
|
||||
while (1) {
|
||||
// delay_ms(1000);
|
||||
// printf("OK!!!\r\n");
|
||||
delay_ms(500);
|
||||
raw_value = ldc1612_get_raw_channel_result(CHANNEL_0);
|
||||
printf("data:%ld\r\n",raw_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user