move bootloader retrieval to common init()

This commit is contained in:
hathach committed 2017-06-29 14:44:02 +07:00
1 parent 79402524e9
commit f42bea8d8f
7 files changed
+20 -21

No files matched your search

-13
View File
@@ -68,21 +68,8 @@ const uint32_t g_ADigitalPinMap[] = {
};
// Must match temp register in bootloader
#define BOOTLOADER_VERSION_REGISTER NRF_TIMER2->CC[0]
uint32_t bootloaderVersion = 0;
void initVariant()
{
bootloaderVersion = BOOTLOADER_VERSION_REGISTER;
// RTC1 is already configured by bootloader. Disable it here
NVIC_DisableIRQ(RTC1_IRQn);
NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk;
NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk;
NRF_RTC1->TASKS_STOP = 1;
NRF_RTC1->TASKS_CLEAR = 1;
// LED1 & LED2
pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1);