Skip to content

Commit 0685c4e

Browse files
authored
Merge pull request zephyrproject-rtos#16 from grgustaf/gpio-not-pwm
[GPIO] Use GPIO driver, not PWM driver, to configure GPIOs
2 parents 2f2f81b + 6dcc71f commit 0685c4e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/zjs_gpio.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include "zjs_gpio.h"
1111
#include "zjs_util.h"
1212

13-
#define GPIO_DRV_NAME "PWM_0"
14-
1513
static const char *ZJS_DIR_IN = "in";
1614
static const char *ZJS_DIR_OUT = "out";
1715

@@ -100,9 +98,9 @@ static void zjs_gpio_call_function(struct zjs_callback *cb)
10098
jerry_object_t *zjs_gpio_init()
10199
{
102100
// effects: finds the GPIO driver and returns the GPIO JS object
103-
zjs_gpio_dev = device_get_binding(GPIO_DRV_NAME);
101+
zjs_gpio_dev = device_get_binding("GPIO_0");
104102
if (!zjs_gpio_dev) {
105-
PRINT("Cannot find %s!\n", GPIO_DRV_NAME);
103+
PRINT("Cannot find GPIO_0 device\n");
106104
}
107105

108106
// create GPIO object

0 commit comments

Comments
 (0)