![]() |
MCCI Trusted Bootloader
Simple trusted bootloader and tools for small embedded systems
|
The bootloader LED annunciator state object. More...
#include <mcci_bootloader_led_annunciator.h>
Data Fields | |
| McciBootloader_LED_AnnunciatorBitState_t | bitState |
| current state of the LED FSM. | |
| uint32_t | bittime |
| number of systicks per bit. | |
| uint32_t | display |
| Mask of pattern to be displayed on the LED. | |
| uint32_t | tick |
| incremented every systick | |
| uint32_t | timer |
| tick count at which next thing should happen. | |
| uint32_t | value |
| bit pattern being displayed. | |
The bootloader LED annunciator state object.
symbolic type for the structure representing the bootloader LED state
Definition at line 50 of file mcci_bootloader_led_annunciator.h.
| McciBootloader_LED_AnnunciatorBitState_t McciBootloader_LED_Annunciator_t::bitState |
current state of the LED FSM.
Definition at line 89 of file mcci_bootloader_led_annunciator.h.
| uint32_t McciBootloader_LED_Annunciator_t::bittime |
number of systicks per bit.
Usually, one systick is assumed to be one millisecond, but this value is used to stretch bit times to something perceptually useful.
Definition at line 85 of file mcci_bootloader_led_annunciator.h.
| uint32_t McciBootloader_LED_Annunciator_t::display |
Mask of pattern to be displayed on the LED.
The display pattern mask in display always ends in a 1, followed by all zeroes to the right. This trailing is the "stop bit", and is not displayed. display itself it is not shifted; it is used to refresh the shift register, which is value. For example, to display 0b101, annunciatorIndicateState adds a stop bit, making 0b1011, then left-justifies in a uint32_t, making 0xB0000000.
This is then copied to value after the inter-pattern gap. The update routine (assumed to be called from the clock tick handler) shifts value left, successively yielding 1, 0, 1. The FSM then flashed the LED for 3 bit times, 1 bit time, and 3 bit times, with a 1-bit time pause between each bit. The FSM discovers when shifting the stop bit that value is now zero, and changes state to displaying the gap betwen words (turning off the LED) for two bit times.
Definition at line 73 of file mcci_bootloader_led_annunciator.h.
| uint32_t McciBootloader_LED_Annunciator_t::tick |
incremented every systick
Definition at line 53 of file mcci_bootloader_led_annunciator.h.
| uint32_t McciBootloader_LED_Annunciator_t::timer |
tick count at which next thing should happen.
Definition at line 87 of file mcci_bootloader_led_annunciator.h.
| uint32_t McciBootloader_LED_Annunciator_t::value |
bit pattern being displayed.
Shifted left each systick. 1 means LED on, 0 means LED off. When zero, there's nothing left to display for the current pattern.
Definition at line 79 of file mcci_bootloader_led_annunciator.h.