Bsongis/horus flash external device (#4446)

* CMake options changed to UNEXPECTED_SHUTDOWN=YES/NO and  PWR_BUTTON=PRESS/SWITCH

* [X12S / X10] Flash an external device is now OK
This commit is contained in:
Bertrand Songis
2017-02-12 21:04:46 +01:00
committed by Andre Bernet
parent 808d7749c7
commit b9bb831b7f
25 changed files with 107 additions and 158 deletions
-6
View File
@@ -46,11 +46,9 @@ void pwrInit()
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
#if !defined(PWR_BUTTON_DISABLED)
// Init PWR SWITCH PIN
GPIO_InitStructure.GPIO_Pin = PWR_SWITCH_GPIO_PIN;
GPIO_Init(PWR_GPIO, &GPIO_InitStructure);
#endif
// Init PCBREV PIN
// TODO to be removed on X10?
@@ -101,11 +99,7 @@ void pwrOff()
uint32_t pwrPressed()
{
#if defined(PWR_BUTTON_DISABLED)
return false;
#else
return GPIO_ReadInputDataBit(PWR_GPIO, PWR_SWITCH_GPIO_PIN) == Bit_RESET;
#endif
}
void pwrResetHandler()