#pragma once
/* ESP32-S3 IO board — pin assignments (SAUL-TEE-SYSTEM-REFERENCE.md) */

/* ── Inter-board UART (to/from BALANCE board) ── */
#define IO_UART_PORT        UART_NUM_0
#define IO_UART_BAUD        460800
#define IO_UART_TX_GPIO     43   /* IO board UART0_TXD → BALANCE RX */
#define IO_UART_RX_GPIO     44   /* IO board UART0_RXD ← BALANCE TX */
/* Note: SAUL-TEE spec says IO TX=IO18, RX=IO21; BALANCE TX=IO17, RX=IO18.
 * This is UART0 on the IO devkit (GPIO43/44). Adjust to match actual wiring. */

/* ── BTS7960 Left motor driver ── */
#define MOTOR_L_RPWM    1
#define MOTOR_L_LPWM    2
#define MOTOR_L_EN_R    3
#define MOTOR_L_EN_L    4

/* ── BTS7960 Right motor driver ── */
#define MOTOR_R_RPWM    5
#define MOTOR_R_LPWM    6
#define MOTOR_R_EN_R    7
#define MOTOR_R_EN_L    8

/* ── Arming button / kill switch ── */
#define ARM_BTN_GPIO    9
#define KILL_GPIO       10

/* ── WS2812B LED strip ── */
#define LED_DATA_GPIO   13

/* ── OTA UART — receives firmware from BALANCE (bd-21hv) ── */
/* Uses same IO_UART_PORT since Balance drives OTA over the inter-board link */

/* ── Firmware version ── */
#define IO_FW_VERSION   "1.0.0"
