Optimize boot order: initialize display and NeoPixel first
This commit is contained in:
@@ -50,14 +50,16 @@ void setup() {
|
|||||||
|
|
||||||
// Setup NeoPixel
|
// Setup NeoPixel
|
||||||
pinMode(PIN_NEOPIXEL, OUTPUT);
|
pinMode(PIN_NEOPIXEL, OUTPUT);
|
||||||
neopixelWrite(PIN_NEOPIXEL, 0, 0, 0); // turn off initially
|
neopixelWrite(PIN_NEOPIXEL, 0, 0, 32); // Turn on solid blue to show booting
|
||||||
|
|
||||||
// Initialize peripherals
|
// Initialize Display and Backlight first so the screen lights up immediately
|
||||||
Flash_test();
|
|
||||||
SD_Init();
|
|
||||||
LCD_Init();
|
LCD_Init();
|
||||||
Set_Backlight(90);
|
Set_Backlight(90);
|
||||||
|
|
||||||
|
// Initialize other peripherals
|
||||||
|
Flash_test();
|
||||||
|
SD_Init();
|
||||||
|
|
||||||
// Setup button
|
// Setup button
|
||||||
pinMode(BOOT_KEY_PIN, INPUT_PULLUP);
|
pinMode(BOOT_KEY_PIN, INPUT_PULLUP);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user