clean up
This commit is contained in:
1 parent
e72a414f2b
commit
781ab83213
1 file changed
+14
-1
+14
-1
@@ -82,7 +82,11 @@ void waitForEvent(void)
|
||||
NVIC_ClearPendingIRQ(FPU_IRQn);
|
||||
#endif
|
||||
|
||||
uint8_t sd_en;
|
||||
#if 1
|
||||
(void) sd_app_evt_wait();
|
||||
#else
|
||||
uint8_t sd_en = 0;
|
||||
|
||||
(void) sd_softdevice_is_enabled(&sd_en);
|
||||
|
||||
if ( sd_en )
|
||||
@@ -95,6 +99,7 @@ void waitForEvent(void)
|
||||
__SEV(); // Clear Event Register.
|
||||
__WFE();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +110,14 @@ void systemOff(uint32_t pin, uint8_t wake_logic)
|
||||
// NRF_POWER->RAM[i].POWERCLR = 0x03UL;
|
||||
// }
|
||||
|
||||
#if 0
|
||||
// pin 0 & 1 is for XTAL
|
||||
for(int i=2; i<PINS_COUNT; i++)
|
||||
{
|
||||
pinMode(i, INPUT);
|
||||
}
|
||||
#endif
|
||||
|
||||
pinMode(pin, wake_logic ? INPUT_PULLDOWN : INPUT_PULLUP);
|
||||
NRF_GPIO->PIN_CNF[pin] |= ((uint32_t) (wake_logic ? GPIO_PIN_CNF_SENSE_High : GPIO_PIN_CNF_SENSE_Low) << GPIO_PIN_CNF_SENSE_Pos);
|
||||
|
||||
|
||||
Reference in new issue
Block a user