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)
104
104
#if defined(LED_NEOPIXEL ) || defined(LED_RGB_RED_PIN )
105
105
neopixel_teardown ();
106
106
#endif
107
- // Button
108
107
109
108
// Stop RTC1 used by app_timer
110
109
NVIC_DisableIRQ (RTC1_IRQn );
@@ -117,12 +116,10 @@ void board_teardown(void)
117
116
NRF_CLOCK -> TASKS_LFCLKSTOP = 1UL ;
118
117
119
118
// 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 )
121
121
{
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 );
126
123
}
127
124
}
128
125
Original file line number Diff line number Diff line change 28
28
#include <stdbool.h>
29
29
#include <stdint.h>
30
30
#include <string.h>
31
+ #include "nrf.h"
31
32
#include "nrf_gpio.h"
32
33
33
34
#include "board.h"
You can’t perform that action at this time.
0 commit comments