changed boot counter #ifdef to safer #if
This commit is contained in:
parent
818020d4c9
commit
f16a4754ba
4
main.c
4
main.c
@ -107,7 +107,7 @@
|
||||
#include "shared-bindings/wifi/__init__.h"
|
||||
#endif
|
||||
|
||||
#ifdef CIRCUITPY_BOOT_COUNTER
|
||||
#if CIRCUITPY_BOOT_COUNTER
|
||||
#include "shared-bindings/nvm/ByteArray.h"
|
||||
uint8_t value_out = 0;
|
||||
#endif
|
||||
@ -801,7 +801,7 @@ int __attribute__((used)) main(void) {
|
||||
// Turn on RX and TX LEDs if we have them.
|
||||
init_rxtx_leds();
|
||||
|
||||
#ifdef CIRCUITPY_BOOT_COUNTER
|
||||
#if CIRCUITPY_BOOT_COUNTER
|
||||
// Increment counter before possibly entering safe mode
|
||||
common_hal_nvm_bytearray_get_bytes(&common_hal_mcu_nvm_obj,0,1,&value_out);
|
||||
++value_out;
|
||||
|
@ -554,7 +554,11 @@ void supervisor_run_background_tasks_if_tick(void);
|
||||
|
||||
#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt"
|
||||
|
||||
#if !defined(CIRCUITPY_INTERNAL_NVM_SIZE) && defined(CIRCUITPY_BOOT_COUNTER)
|
||||
#ifndef CIRCUITPY_BOOT_COUNTER
|
||||
#define CIRCUITPY_BOOT_COUNTER 0
|
||||
#endif
|
||||
|
||||
#if !defined(CIRCUITPY_INTERNAL_NVM_SIZE) && CIRCUITPY_BOOT_COUNTER != 0
|
||||
#error "boot counter requires CIRCUITPY_NVM enabled"
|
||||
#endif
|
||||
|
||||
|
@ -35,9 +35,7 @@ DEFAULT_IGNORELIST = [
|
||||
"circuitplayground_express_displayio",
|
||||
"pycubed",
|
||||
"pycubed_mram",
|
||||
"pycubed_v04",
|
||||
"pycubed_v05",
|
||||
"pycubed_mram_v04",
|
||||
"pycubed_mram_v05",
|
||||
"pygamer",
|
||||
"pygamer_advance",
|
||||
|
Loading…
Reference in New Issue
Block a user