From 415fe8988e579c3185c7ba074733859506c1c7c3 Mon Sep 17 00:00:00 2001 From: Guo Wenxue <guowenxue@gmail.com> Date: Sat, 03 Aug 2019 22:50:00 +0800 Subject: [PATCH] update mqttd program, add buzzer control and test ok --- mqttd/hal/hal.h | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/mqttd/hal/hal.h b/mqttd/hal/hal.h index 5788ff8..53e0826 100644 --- a/mqttd/hal/hal.h +++ b/mqttd/hal/hal.h @@ -21,6 +21,8 @@ #include "ds18b20.h" #include "sht20.h" +#include "tsl2561.h" +#include "beep.h" #define OFF 0 #define ON 1 @@ -34,6 +36,14 @@ LED_MAX, }; -int hal_init(hwconf_t *conf); +extern int hal_init(hwconf_t *conf); +extern void turn_relay(int cmd); +extern int turn_led(int which, int cmd); +extern void init_infrared(int pin); +extern void turn_beep(int times); + +/* jitter_time: cancel jitter interval time + * Return value: 1(HIGH): Sombody detected 0(LOW): Nobody detected */ +extern int infrared_detect(int jitter_time); #endif /* ----- #ifndef _HAL_H_ ----- */ -- Gitblit v1.9.1