From 58c8ac63fd0878598580c4c413ba7ddd04c760a0 Mon Sep 17 00:00:00 2001 From: yelvlab Date: Wed, 18 Dec 2024 20:05:35 +0800 Subject: [PATCH] add config array --- src/main.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/main.c b/src/main.c index 6e28d6c..e819d1e 100644 --- a/src/main.c +++ b/src/main.c @@ -39,6 +39,9 @@ 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 @@ -58,24 +61,14 @@ int main(void) { delay_ms(500); - // int result = 0; - // uint16_t data = 0; - // uint16_t device_id = 0; - // LDC1612_IIC_read_16bits(READ_DEVICE_ID, &data); - // printf("result = %d\r\n", result); + uint16_t device_id = 0; + device_id = ldc1612_get_deveice_id(); + printf("device id = 0x%x\r\n", device_id); - // delay_ms(1000); - - // LDC1612_IIC_read_16bits(READ_DEVICE_ID, &device_id); - // printf("Manufacturer: 0x%x\r\n", data); - // printf("Device: 0x%x\r\n", device_id); - - ldc1612_iic_get_sensor_infomation(); - while (1) { - delay_ms(1000); - printf("OK!!!\r\n"); + // delay_ms(1000); + // printf("OK!!!\r\n"); } }