guowenxue
2019-07-31 4deb51ffc4dd4588183aed82bd7877909ba2130e
mqttd/hal/hal.h
@@ -14,13 +14,30 @@
#ifndef  _HAL_H_
#define  _HAL_H_
#include "lylib/logger.h"
#include <wiringPi.h>
#include "led.h"
#include "relay.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);
extern void init_infrared(int pin, int irq_type, void (*handler)(void));
extern void turn_beep(int times);
#endif   /* ----- #ifndef _HAL_H_  ----- */