guowenxue
2021-04-21 af30c84d820576c37e57de31bc47d18b6e4b89e1
iotd/hal/gpio.h
@@ -16,18 +16,15 @@
#include <gpiod.h>
#define OFF   0
#define ON    1
#define GPIO_MAXOUT         8
#define GPIO_MAXIN          4
typedef struct gpio_info_s
{
    char                 name[32];      /*  GPIO connected module name */
    int                  pin;          /*  GPIO BCM pin number */
    int                  pin;           /*  GPIO BCM pin number */
    int                  active_level;  /*  active power level */
    struct gpiod_line   *lines;         /*  gpiod lines */
    struct gpiod_line   *line;          /*  gpiod line */
} gpio_info_t;
@@ -46,10 +43,7 @@
/* turn which light on/off */
extern void turn_light(int which, int cmd);
/* turn which led on/off */
extern void turn_led(int which, int cmd);
void gpio_out(char *name, char *cmd);
/* Return value: 0(LOW): Nobody detected, !0: Which infrared detect incoming */
extern int infrared_detect(void);