69#define FUNCTION "McciBootloader_LED_annunciatorInit"
114#define FUNCTION "McciBootloader_LED_annunciatorIndicateState"
123 uint32_t display = ((uint32_t)state << 1) | 1;
126 for (nBits = 31; nBits > 2; --nBits)
128 if (display & (UINT32_C(1) << nBits))
134 if (((display + 1) & display) == 0)
137 annunciator.display = (uint32_t)display << (31 - nBits);
159 const bool fNextBit = !!(
annunciator.value & UINT32_C(0x80000000));
McciBootloader_LED_AnnunciatorBitState_t
The states of the Bootloader LED finite state machine.
@ McciBootloader_LED_Annunciator_stNoChange
internal: don't change state.
@ McciBootloader_LED_Annunciator_stByteGap
displaying byte gap
@ McciBootloader_LED_Annunciator_stInitial
not initialized
@ McciBootloader_LED_Annunciator_stLedOn
light is on
@ McciBootloader_LED_Annunciator_stBitGap
displaying bit gap
@ McciBootloader_LED_Annunciator_stIdle
not displaying
uint32_t McciBootloaderState_t
Current boot system state.
void McciBootloader_LED_annunciatorIndicateState(McciBootloaderState_t state)
static McciBootloader_LED_Annunciator_t annunciator
void McciBootloader_LED_annunciatorInit(void)
static bool nextBit(void)
process the next bit from the current word, and set timers
bool McciBootloader_LED_handleSysTick(void)