- SPI_Bus_Lock: serialize LCD + SD on shared SPI; pause display during SD - SD_Init after WiFi scan; SD_IsReady gating; serial [SD]/[CAP] diagnostics - MUST_DO_IMPROVEMENTS.md full firmware review backlog; README link - Bump HANDSHAKE_FIRMWARE_VERSION to 1.0.2 (header) Made-with: Cursor
19 lines
516 B
C
19 lines
516 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();
|
|
bool SD_WriteFileAtomic(const char* path, const uint8_t* data, size_t len);
|