From 5e9d03d507aad324a803eb8795e0eed6fb671761 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Mon, 10 Jul 2023 15:24:52 +0800 Subject: [PATCH] Merge branch 'master' of http://master.iot-yun.club:8088/r/raspberrypi --- iotd/hal/hal.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/iotd/hal/hal.c b/iotd/hal/hal.c index 7763e60..7643b24 100644 --- a/iotd/hal/hal.c +++ b/iotd/hal/hal.c @@ -17,7 +17,6 @@ int hal_init(hal_ctx_t *ctx) { int i; - gpio_info_t *gpio = NULL; if(!ctx) { @@ -32,15 +31,23 @@ log_err("R&H sensor SHT2X initialise failure\n"); return -2; } + else + { + log_nrml("R&H sensor SHT2X initialise okay\n"); + } } if( ctx->lux_enable ) { - if( tsl2561_init()< 0 ) + if( tsl2561_init() < 0 ) { log_err("LUX sensor TSL2561 initialise failure\n"); return -2; } + else + { + log_nrml("LUX sensor TSL2561 initialise okay\n"); + } } gpio_init(&ctx->gpio); -- Gitblit v1.9.1