follow up to #114

This commit is contained in:
hathach 2020-03-12 12:21:57 +07:00
parent 8ccb638a84
commit ab4ecd141f
2 changed files with 4 additions and 6 deletions

View File

@ -104,7 +104,6 @@ void board_teardown(void)
#if defined(LED_NEOPIXEL) || defined(LED_RGB_RED_PIN)
neopixel_teardown();
#endif
// Button
// Stop RTC1 used by app_timer
NVIC_DisableIRQ(RTC1_IRQn);
@ -117,12 +116,10 @@ void board_teardown(void)
NRF_CLOCK->TASKS_LFCLKSTOP = 1UL;
// make sure all pins are back in reset state
for (int i = 0; i < 32; ++i)
// NUMBER_OF_PINS is defined in nrf_gpio.h
for (int i = 0; i < NUMBER_OF_PINS; ++i)
{
NRF_P0->PIN_CNF[i] = 2;
#ifdef NRF_P1
NRF_P1->PIN_CNF[i] = 2;
#endif
nrf_gpio_cfg_default(i);
}
}

View File

@ -28,6 +28,7 @@
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nrf.h"
#include "nrf_gpio.h"
#include "board.h"