From eeb821fa6846e84c9fe3e80d58f41b7a5a418e70 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Wed, 21 Apr 2021 22:27:56 +0800
Subject: [PATCH] update hal.x
---
iotd/hal/gpio.h | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/iotd/hal/gpio.h b/iotd/hal/gpio.h
index d1a2a23..6a45e11 100644
--- a/iotd/hal/gpio.h
+++ b/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;
@@ -44,12 +41,8 @@
extern int gpio_init(gpio_t *gpio);
extern void gpio_term(void);
-
/* 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);
+extern void gpio_out(char *name, char *cmd);
/* Return value: 0(LOW): Nobody detected, !0: Which infrared detect incoming */
extern int infrared_detect(void);
--
Gitblit v1.9.1