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

38
main/hw_pins.h Normal file
View File

@@ -0,0 +1,38 @@
/*
* MTG RFID Companion - Hardware pin assignments
*
* Do NOT change these unless explicitly instructed. SPI2_HOST (VSPI) is
* shared by the ST7789 display and the MFRC522 RFID reader.
*/
#pragma once
#include "sdkconfig.h"
#include "hal/gpio_types.h"
#include "driver/spi_master.h"
/* Shared SPI2_HOST (VSPI) bus */
#define HW_SPI_HOST (SPI2_HOST)
#define HW_SPI_SCK_GPIO (GPIO_NUM_18)
#define HW_SPI_MOSI_GPIO (GPIO_NUM_23)
#define HW_SPI_MISO_GPIO (GPIO_NUM_19)
/* MFRC522 RFID reader */
#define HW_RC522_CS_GPIO (GPIO_NUM_5)
#define HW_RC522_RST_GPIO (GPIO_NUM_22)
/* ST7789 display */
#define HW_LCD_CS_GPIO (GPIO_NUM_15)
#define HW_LCD_DC_GPIO (GPIO_NUM_2)
#define HW_LCD_RST_GPIO (GPIO_NUM_4)
/* EC11 rotary encoder */
#define HW_ENC_CLK_GPIO (GPIO_NUM_32)
#define HW_ENC_DT_GPIO (GPIO_NUM_33)
#define HW_ENC_SW_GPIO (GPIO_NUM_25)
/* WS2812B Neopixel */
#define HW_NEOPIXEL_GPIO (GPIO_NUM_27)
/* Piezo buzzer */
#define HW_BUZZER_GPIO (GPIO_NUM_14)