diff options
| author | Jean-François Milants <jf@codingfield.com> | 2023-10-23 20:12:34 +0200 |
|---|---|---|
| committer | JF <JF002@users.noreply.github.com> | 2023-11-19 21:13:55 +0100 |
| commit | 63e0c4f4efb047f4f15601f7b08640c4b589de93 (patch) | |
| tree | 5392f0efd6ada7e218fb8b85545d02ae3f33fac3 /src/drivers/Watchdog.cpp | |
| parent | f6d7f602f57f93dbf5a68a371cc1a9d019e1408d (diff) | |
Application selection at build time
A list of "user applications" is built at compile time. It contains all the info needed to create the application at runtime (ptr to a create() function) and to display the app in the application menu. All applications declare a TypeTrait with these information.
When a new app must be loaded, DisplayApp first check if this app is a System app (in which case it creates it like it did before). If it's not a System app, it looks for the app in the list of User applications and creates it if it found it.
Those changes allow to more easily add new app and to select which app must be built into the firmware.
Switch to C++20 (and fix a few issues in SpiMaster.cpp and Watchdog.cpp.
Diffstat (limited to 'src/drivers/Watchdog.cpp')
| -rw-r--r-- | src/drivers/Watchdog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Watchdog.cpp b/src/drivers/Watchdog.cpp index 6c2c963b..eeeb6cfd 100644 --- a/src/drivers/Watchdog.cpp +++ b/src/drivers/Watchdog.cpp @@ -41,7 +41,7 @@ namespace { // RRED (Reload Register Enable) is a bitfield of 8 bits. Each bit represent // one of the eight reload registers available. // In this case, we enable only the first one. - NRF_WDT->RREN |= 1; + NRF_WDT->RREN = NRF_WDT->RREN | 1; } /// Returns the reset reason provided by the POWER subsystem |
