|
Open Model Railroad Network (OpenMRN)
|
Go to the source code of this file.
Functions | |
| static TIM_TypeDef * | get_blinker_timer () |
| void | setup_blinker () |
| Call this function in hw_preinit to set up the blinker timer. | |
| void | hw_set_to_safe (void) |
| void | resetblink (uint32_t pattern) |
| Changes the blinking pattern. | |
| void | setblink (uint32_t pattern) |
| Initializes the blinker routine with a specific blinking pattern. | |
| void | BLINKER_INTERRUPT_HANDLER (void) |
| void | wait_with_blinker (void) |
| void | diewith (uint32_t pattern) |
| Sets a blinking pattern and never returns. | |
Variables | |
| uint32_t | blinker_pattern = 0 |
| Stores the canonical pattern for the blinker. | |
| static uint32_t | rest_pattern = 0 |
| Stores what is left of the pattern during the current period. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Implements the crash blinker using an STM32 timer.
Definition in file Stm32Blinker.hxx.
| void BLINKER_INTERRUPT_HANDLER | ( | void | ) |
Definition at line 122 of file Stm32Blinker.hxx.
| void diewith | ( | uint32_t | pattern | ) |
Sets a blinking pattern and never returns.
Definition at line 148 of file Stm32Blinker.hxx.
|
inlinestatic |
Definition at line 68 of file Stm32Blinker.hxx.
| void resetblink | ( | uint32_t | pattern | ) |
Changes the blinking pattern.
| pattern | is the new blinking pattern. |
Definition at line 109 of file Stm32Blinker.hxx.
| void setblink | ( | uint32_t | pattern | ) |
Initializes the blinker routine with a specific blinking pattern.
| pattern | is the blinking pattern. |
Definition at line 117 of file Stm32Blinker.hxx.
| void setup_blinker | ( | ) |
Call this function in hw_preinit to set up the blinker timer.
Definition at line 76 of file Stm32Blinker.hxx.
| void wait_with_blinker | ( | void | ) |
Definition at line 140 of file Stm32Blinker.hxx.
| uint32_t blinker_pattern = 0 |
Stores the canonical pattern for the blinker.
The currently active blinking pattern.
Definition at line 103 of file Stm32Blinker.hxx.
|
static |
Stores what is left of the pattern during the current period.
Definition at line 105 of file Stm32Blinker.hxx.