From c6dff0f738ecd7b1d8f7857dbf3b49fb23ee9b29 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Tue, 30 Jul 2019 23:27:21 +0800 Subject: [PATCH] Update setup_wiringPi shell script --- mqttd/hal/hal.h | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/mqttd/hal/hal.h b/mqttd/hal/hal.h index ca14438..775885b 100644 --- a/mqttd/hal/hal.h +++ b/mqttd/hal/hal.h @@ -14,12 +14,28 @@ #ifndef _HAL_H_ #define _HAL_H_ -#include "lylib/logger.h" +#include <wiringPi.h> -#include "led.h" +#include "lylib/logger.h" +#include "etc/conf.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