refactor: bootloader & cmake cleanup (#5232)

This commit is contained in:
Raphael Coeffic
2024-07-07 21:06:59 +10:00
committed by GitHub
parent 848d7942bf
commit d575242c0f
35 changed files with 483 additions and 547 deletions
@@ -0,0 +1,24 @@
#include "board.h"
#include "hal/key_driver.h"
#if defined(BOOTLOADER_KEYS)
bool boardBLStartCondition()
{
// Trims combo activated
bool result = (readTrims() == BOOTLOADER_KEYS);
#if defined(SECONDARY_BOOTLOADER_KEYS)
result |= (readTrims() == SECONDARY_BOOTLOADER_KEYS);
#endif
return result;
}
#elif (defined(RADIO_T8) || defined(RADIO_COMMANDO8)) && !defined(RADIOMASTER_RELEASE)
bool boardBLStartCondition()
{
// Bind button pressed
return (KEYS_GPIO_REG_BIND->IDR & KEYS_GPIO_PIN_BIND) == 0;
}
#endif