Complete data reading

This commit is contained in:
2024-12-20 14:12:48 +08:00
parent 529f1b3628
commit c88a383c29
3 changed files with 92 additions and 57 deletions

View File

@@ -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);
}
}