Phase 2: LittleFS storage manager on /spiffs + shared SPI2_HOST bus

This commit is contained in:
2026-09-09 16:43:27 +02:00
parent 1771525c06
commit 02410d33d8
7 changed files with 355 additions and 6 deletions

27
main/spi_bus_manager.h Normal file
View File

@@ -0,0 +1,27 @@
/*
* MTG RFID Companion - Shared SPI bus manager
*
* Phase 2 Step 2.3: Initializes the single SPI2_HOST (VSPI) bus shared by
* the ST7789 display and the MFRC522 RFID reader.
*/
#pragma once
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Initialize the shared SPI2_HOST bus.
*
* Must be called exactly once before the display and RFID driver attach
* their SPI devices. MFRC522 is passed a NULL bus_config so that it adds
* its device to this pre-existing bus instead of trying to own it.
*/
esp_err_t spi_bus_manager_init(void);
#ifdef __cplusplus
}
#endif