diff options
| author | Jean-François Milants <jf@codingfield.com> | 2021-06-12 08:58:28 (GMT) |
|---|---|---|
| committer | Jean-François Milants <jf@codingfield.com> | 2021-06-12 08:58:28 (GMT) |
| commit | 6d524ebea2c97e309633d5e01c3a1e37c182f27d (patch) | |
| tree | 3f9c7f96f0fab64f581035c72480596a4cc4db43 /src/drivers/SpiMaster.h | |
| parent | b1925ff28638dd4b8400c4d0c49d796d8990b1af (diff) | |
Move most of the code from the constructor of the objects statically initialized in main() into Start()/Init() functions to avoid Static Initialization Order Fiasco (https://en.cppreference.com/w/cpp/language/siof). See https://github.com/JF002/InfiniTime/pull/415#issuecomment-859004238.
Diffstat (limited to 'src/drivers/SpiMaster.h')
| -rw-r--r-- | src/drivers/SpiMaster.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index 5045369..5ea624f 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -59,7 +59,7 @@ namespace Pinetime { volatile uint32_t currentBufferAddr = 0; volatile size_t currentBufferSize = 0; volatile TaskHandle_t taskToNotify; - SemaphoreHandle_t mutex; + SemaphoreHandle_t mutex = nullptr; }; } } |
