We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85a5153 commit d248bccCopy full SHA for d248bcc
envie/ota.cpp
@@ -22,6 +22,7 @@
22
23
#define ALL_IN_SD 1
24
25
+static bool BlockTableLoaded = false;
26
static BlockTableData block_info[2];
27
28
static void loadOTAData(void) {
@@ -367,7 +368,10 @@ static void initBlockTable(void) {
367
368
*/
369
mbed::BlockDevice* get_secondary_bd(void) {
370
- initBlockTable();
371
+ if(!BlockTableLoaded) {
372
+ initBlockTable();
373
+ BlockTableLoaded = true;
374
+ }
375
376
if(block_info[SECONDARY_BLOCK_DEVICE].raw_flag) {
377
return block_info[SECONDARY_BLOCK_DEVICE].log_bd;
0 commit comments