feat(firmware): 硬件联调引脚定义&远程启动充电和相关外设联动逻辑

This commit is contained in:
2026-04-19 20:20:03 +08:00
parent c7f9c959e0
commit c11c7f1a4a
2 changed files with 376 additions and 5 deletions

View File

@@ -0,0 +1,36 @@
#ifndef HELIOS_PINS_H
#define HELIOS_PINS_H
#include <Arduino.h>
// Panel switches and LEDs
static const uint8_t PIN_CC1 = 39; // High-active switch
static const uint8_t PIN_CC2 = 36; // High-active switch
static const uint8_t PIN_LED1 = 32; // Low-active LED
static const uint8_t PIN_LED2 = 33; // Low-active LED
// Key inputs
static const uint8_t PIN_KEY1 = 34;
static const uint8_t PIN_KEY2 = 35;
// Relay outputs
static const uint8_t PIN_RELAY1 = 27;
static const uint8_t PIN_RELAY2 = 14;
// I2C (OLED)
static const uint8_t PIN_OLED_SCL = 22;
static const uint8_t PIN_OLED_SDA = 21;
// SPI (RC522)
static const uint8_t PIN_RC_MOSI = 23;
static const uint8_t PIN_RC_MISO = 19;
static const uint8_t PIN_RC_SCK = 18;
static const uint8_t PIN_RC_CS = 5;
static const uint8_t PIN_RC_RST = 4;
// UART2 <-> IM1281C (U2)
static const uint8_t PIN_U2TXD = 26;
static const uint8_t PIN_U2RXD = 25;
static const uint32_t BAUD_IM1281C = 9600;
#endif // HELIOS_PINS_H