We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2f2f81b + 6dcc71f commit 0685c4eCopy full SHA for 0685c4e
src/zjs_gpio.c
@@ -10,8 +10,6 @@
10
#include "zjs_gpio.h"
11
#include "zjs_util.h"
12
13
-#define GPIO_DRV_NAME "PWM_0"
14
-
15
static const char *ZJS_DIR_IN = "in";
16
static const char *ZJS_DIR_OUT = "out";
17
@@ -100,9 +98,9 @@ static void zjs_gpio_call_function(struct zjs_callback *cb)
100
98
jerry_object_t *zjs_gpio_init()
101
99
{
102
// effects: finds the GPIO driver and returns the GPIO JS object
103
- zjs_gpio_dev = device_get_binding(GPIO_DRV_NAME);
+ zjs_gpio_dev = device_get_binding("GPIO_0");
104
if (!zjs_gpio_dev) {
105
- PRINT("Cannot find %s!\n", GPIO_DRV_NAME);
+ PRINT("Cannot find GPIO_0 device\n");
106
}
107
108
// create GPIO object
0 commit comments