more accelerometer work

This commit is contained in:
joeycastillo
2024-10-19 12:35:46 -04:00
parent 57de3e77f5
commit 19376625d1
6 changed files with 76 additions and 27 deletions

View File

@@ -133,6 +133,10 @@ static void _watch_disable_all_pins_except_rtc(void) {
if (config & RTC_TAMPCTRL_IN0ACT_Msk) portb_pins_to_disable &= 0xFFFFFFFE;
// same with RTC/IN[1] and PB02
if (config & RTC_TAMPCTRL_IN1ACT_Msk) portb_pins_to_disable &= 0xFFFFFFFB;
#ifdef HAS_ACCELEROMETER
// if we're using the Motion board, keep A3 configured (it tracks the accelerometer sleep state)
portb_pins_to_disable &= 0xFFFFFFF7;
#endif
// port A: that last B is to always keep PA02 configured as-is; that's our ALARM button.
PORT->Group[0].DIRCLR.reg = 0xFFFFFFFB;