Add a lowpower test for the buttons

Resolves #19
This commit is contained in:
2020-07-05 17:17:25 -07:00
parent 08085c465d
commit 63527bdb03
4 changed files with 104 additions and 5 deletions

View File

@@ -50,12 +50,13 @@ ReturnCode LowPower::init(GpioPin &timing_pin)
ReturnCode LowPower::enable_debug()
{
/* Enable Clocks */
// FIXME for all boards
// SET(RCC->APB2ENR, RCC_APB2ENR_DBGEN);
// SET(RCC->APB2SMENR, RCC_APB2SMENR_DBGSMEN);
// SET(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
// SET(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
// SET(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
SET(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
SET(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
SET(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
return ReturnCode::OK;
}