add CIRCUITPY_SKIP_SAFE_MODE_WAIT to circuitpy_mpconfig.mk

use #if (also a CIRCUITPY_ULAB)
This commit is contained in:
Neradoc 2023-01-28 20:31:59 +01:00
parent 7522522a0a
commit f0058774d0
3 changed files with 7 additions and 2 deletions

View File

@ -393,6 +393,11 @@ CFLAGS += -DCIRCUITPY_SETTABLE_PROCESSOR_FREQUENCY=$(CIRCUITPY_SETTABLE_PROCESSO
CIRCUITPY_SHARPDISPLAY ?= $(CIRCUITPY_FRAMEBUFFERIO)
CFLAGS += -DCIRCUITPY_SHARPDISPLAY=$(CIRCUITPY_SHARPDISPLAY)
# Disable the safe mode blink at boot. Speeds up boot time, but makes it
# impossible to enter safe mode by pressing buttons on boot.
CIRCUITPY_SKIP_SAFE_MODE_WAIT ?= 0
CFLAGS += -DCIRCUITPY_SKIP_SAFE_MODE_WAIT=$(CIRCUITPY_SKIP_SAFE_MODE_WAIT)
CIRCUITPY_SOCKETPOOL ?= $(CIRCUITPY_WIFI)
CFLAGS += -DCIRCUITPY_SOCKETPOOL=$(CIRCUITPY_SOCKETPOOL)

View File

@ -40,7 +40,7 @@
#include "shared-module/adafruit_pixelbuf/PixelBuf.h"
#include "shared-bindings/digitalio/DigitalInOut.h"
#ifdef CIRCUITPY_ULAB
#if CIRCUITPY_ULAB
#include "extmod/ulab/code/ndarray.h"
#endif

View File

@ -66,7 +66,7 @@ safe_mode_t wait_for_safe_mode_reset(void) {
reset_reason != RESET_REASON_SOFTWARE) {
return NO_SAFE_MODE;
}
#ifdef CIRCUITPY_SKIP_SAFE_MODE_WAIT
#if CIRCUITPY_SKIP_SAFE_MODE_WAIT
return NO_SAFE_MODE;
#endif
port_set_saved_word(SAFE_MODE_DATA_GUARD | (MANUAL_SAFE_MODE << 8));