Skip to content

Commit

Permalink
samples: nrf52: onoff-app: use dts-generated defines
Browse files Browse the repository at this point in the history
This commit updates the onoff-app sample to use the dts-generated
defines instead of the aliases in board.h.

Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no>
  • Loading branch information
lemrey authored and galak committed Sep 11, 2018
1 parent 7fb051b commit 0a15793
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions samples/boards/nrf52/mesh/onoff-app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ void main(void)
/* Initialize button count timer */
k_timer_init(&sw.button_timer, button_cnt_timer, NULL);

sw_device = device_get_binding(SW0_GPIO_NAME);
sw_device = device_get_binding(SW0_GPIO_CONTROLLER);
gpio_pin_configure(sw_device, SW0_GPIO_PIN,
(GPIO_DIR_IN | GPIO_INT | GPIO_INT_EDGE |
GPIO_INT_ACTIVE_LOW | GPIO_PUD_PULL_UP));
Expand All @@ -666,10 +666,10 @@ void main(void)
gpio_pin_enable_callback(sw_device, SW3_GPIO_PIN);

/* Initialize LED's */
init_led(0, LED0_GPIO_PORT, LED0_GPIO_PIN);
init_led(1, LED1_GPIO_PORT, LED1_GPIO_PIN);
init_led(2, LED2_GPIO_PORT, LED2_GPIO_PIN);
init_led(3, LED3_GPIO_PORT, LED3_GPIO_PIN);
init_led(0, LED0_GPIO_CONTROLLER, LED0_GPIO_PIN);
init_led(1, LED1_GPIO_CONTROLLER, LED1_GPIO_PIN);
init_led(2, LED2_GPIO_CONTROLLER, LED2_GPIO_PIN);
init_led(3, LED3_GPIO_CONTROLLER, LED3_GPIO_PIN);

/* Initialize the Bluetooth Subsystem */
err = bt_enable(bt_ready);
Expand Down

0 comments on commit 0a15793

Please sign in to comment.