Skip to content

Commit

Permalink
Merge pull request zephyrproject-rtos#16 from grgustaf/gpio-not-pwm
Browse files Browse the repository at this point in the history
[GPIO] Use GPIO driver, not PWM driver, to configure GPIOs
  • Loading branch information
poussa authored Jun 30, 2016
2 parents 2f2f81b + 6dcc71f commit 0685c4e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/zjs_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "zjs_gpio.h"
#include "zjs_util.h"

#define GPIO_DRV_NAME "PWM_0"

static const char *ZJS_DIR_IN = "in";
static const char *ZJS_DIR_OUT = "out";

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

// create GPIO object
Expand Down

0 comments on commit 0685c4e

Please sign in to comment.