From e0e3a637e92dbe3c7700cc541410ff19b3b0c80c Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 21 Apr 2021 12:44:30 +0800
Subject: [PATCH] update iotd hal functions

---
 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