- Gate capture on SD_IsReady() after successful SD_Init; avoid false 'insert SD' when SD.cardType() lies after WiFi on shared SPI with LCD - SD_Init: LCD CS high, SD.end() on empty card; HandshakeCapture save path retries SD_Init before discard - FAT filename sanitize, discard deadlocks, WPA3 scan labels, docs (README, PRODUCTION, IMPROVEMENTS), firmware version 1.0.1 Made-with: Cursor
18 lines
440 B
C
18 lines
440 B
C
#pragma once
|
|
|
|
#include <Arduino.h>
|
|
#include <SD.h>
|
|
#include <SPI.h>
|
|
|
|
#define SD_CS 4
|
|
|
|
extern uint16_t SDCard_Size;
|
|
|
|
bool SD_Init();
|
|
/**
|
|
* True only after the last SD_Init() completed successfully (SD.begin + valid cardType).
|
|
* Use this to gate capture — do NOT rely on SD.cardType() alone after WiFi on ESP32-C6:
|
|
* with LCD+SD sharing SPI, cardType() can spuriously read CARD_NONE and falsely show "insert SD".
|
|
*/
|
|
bool SD_IsReady();
|