From 6d7b28e6a7836988247c188f4284861fe33410ae Mon Sep 17 00:00:00 2001
From: Guo Wenxue <guowenxue@gmail.com>
Date: Fri, 05 Jul 2019 12:26:37 +0800
Subject: [PATCH] update tsl2561 code, update delay time to 400ms
---
mqttd/hal/hal.h | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/mqttd/hal/hal.h b/mqttd/hal/hal.h
index 7855cdd..775885b 100644
--- a/mqttd/hal/hal.h
+++ b/mqttd/hal/hal.h
@@ -17,12 +17,25 @@
#include <wiringPi.h>
#include "lylib/logger.h"
+#include "etc/conf.h"
-#include "led.h"
-#include "relay.h"
#include "ds18b20.h"
#include "sht20.h"
-int hal_init(void);
+#define OFF 0
+#define ON 1
+
+/* Three LEDs code */
+enum
+{
+ LED_R = 0,
+ LED_G,
+ LED_B,
+ LED_MAX,
+};
+
+extern int hal_init(hwconf_t *conf);
+extern void turn_relay(int cmd);
+extern int turn_led(int which, int cmd);
#endif /* ----- #ifndef _HAL_H_ ----- */
--
Gitblit v1.9.1