File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,6 @@ void board_teardown(void)
104104#if defined(LED_NEOPIXEL ) || defined(LED_RGB_RED_PIN )
105105 neopixel_teardown ();
106106#endif
107- // Button
108107
109108 // Stop RTC1 used by app_timer
110109 NVIC_DisableIRQ (RTC1_IRQn );
@@ -117,12 +116,10 @@ void board_teardown(void)
117116 NRF_CLOCK -> TASKS_LFCLKSTOP = 1UL ;
118117
119118 // make sure all pins are back in reset state
120- for (int i = 0 ; i < 32 ; ++ i )
119+ // NUMBER_OF_PINS is defined in nrf_gpio.h
120+ for (int i = 0 ; i < NUMBER_OF_PINS ; ++ i )
121121 {
122- NRF_P0 -> PIN_CNF [i ] = 2 ;
123- #ifdef NRF_P1
124- NRF_P1 -> PIN_CNF [i ] = 2 ;
125- #endif
122+ nrf_gpio_cfg_default (i );
126123 }
127124}
128125
Original file line number Diff line number Diff line change 2828#include <stdbool.h>
2929#include <stdint.h>
3030#include <string.h>
31+ #include "nrf.h"
3132#include "nrf_gpio.h"
3233
3334#include "board.h"
You can’t perform that action at this time.
0 commit comments