TB2026-YDS Firmware
Loading...
Searching...
No Matches
board_pins.h File Reference

GPIO pin map for the TB2026-YDS board. More...

Go to the source code of this file.

Macros

SPI2 (HSPI) — Display (NHD-1.91), native IOMUX pins
#define PIN_DISP_MOSI   (13)
#define PIN_DISP_MISO   (-1)
 write-only panel
#define PIN_DISP_CLK   (14)
#define PIN_DISP_CS   (15)
#define PIN_DISP_DC   (12)
 MTDI strapping pin: must not be high at reset.
#define PIN_DISP_RST   (2)
SPI3 (VSPI) — SD card, native IOMUX pins
#define PIN_SD_MOSI   (23)
#define PIN_SD_MISO   (19)
#define PIN_SD_CLK   (18)
#define PIN_SD_CS   (5)
#define PIN_SD_DETECT   (21)
I2C — shared bus (expander, DAC ctrl, fuel gauge)
#define PIN_I2C_SDA   (32)
#define PIN_I2C_SCL   (33)
I2S — PCM stream to DAC
#define PIN_I2S_BCLK   (26)
#define PIN_I2S_WS   (25)
 LRCK.
#define PIN_I2S_DOUT   (27)
ADC — potentiometer (SENSOR_VP)
#define PIN_POT_ADC   (36)
#define POT_ADC_CHANNEL   ADC_CHANNEL_0
 ADC1.
Inputs — GPIO34..39 are input-only, no internal pulls (external pulls required)
#define PIN_BTN_A   (39)
 SENSOR_VN.
#define PIN_BATT_ALERT   (34)
 MAX17260 ALRT.
#define PIN_EXPANDER_INT   (35)
 PI4IOE5V9554A INT.
Control outputs
#define PIN_REG_EN   (4)
 EnableReg.
#define PIN_USB_DIR   (22)
 PI3USB221AZUAEX USB mux select.
GPIO expander channels (PI4IOE5V9554A on I2C 0x38) — IO0..IO7 bit positions.

These are channel indices on the expander, not ESP32 GPIOs. Pin polarity (XSMT/SHDN active-low, etc.) lives in the drivers, not here.

#define EXP_DAC_MUTE   (0)
 IO0: PCM5242 XSMT (DAC soft mute).
#define EXP_AMP_SHDN   (1)
 IO1: MAX97220 shutdown.
#define EXP_BTN_B   (2)
 IO2: button B.
#define EXP_BTN_RIGHT   (3)
 IO3: button Right.
#define EXP_BTN_LEFT   (4)
 IO4: button Left.
#define EXP_BTN_DOWN   (5)
 IO5: button Down.
#define EXP_BTN_UP   (6)
 IO6: button Up.
#define EXP_INOKB   (7)
 IO7: MAX77757 charger INOKB, open-drain, low = valid input at CHGIN.

Detailed Description

GPIO pin map for the TB2026-YDS board.

EN (FlashEN), IO0 (FlashIO0), U0RXD/U0TXD: CP2102N auto-flash + console, not firmware-controlled.

Note
Développé avec l'assistance de Claude Opus 4.8 (Anthropic), sous la direction de Y. Dos Santos : spécification, revue et validation sur cible par l'auteur.

Macro Definition Documentation

◆ EXP_AMP_SHDN

#define EXP_AMP_SHDN   (1)

IO1: MAX97220 shutdown.

◆ EXP_BTN_B

#define EXP_BTN_B   (2)

IO2: button B.

◆ EXP_BTN_DOWN

#define EXP_BTN_DOWN   (5)

IO5: button Down.

◆ EXP_BTN_LEFT

#define EXP_BTN_LEFT   (4)

IO4: button Left.

◆ EXP_BTN_RIGHT

#define EXP_BTN_RIGHT   (3)

IO3: button Right.

◆ EXP_BTN_UP

#define EXP_BTN_UP   (6)

IO6: button Up.

◆ EXP_DAC_MUTE

#define EXP_DAC_MUTE   (0)

IO0: PCM5242 XSMT (DAC soft mute).

◆ EXP_INOKB

#define EXP_INOKB   (7)

IO7: MAX77757 charger INOKB, open-drain, low = valid input at CHGIN.

◆ PIN_BATT_ALERT

#define PIN_BATT_ALERT   (34)

MAX17260 ALRT.

◆ PIN_BTN_A

#define PIN_BTN_A   (39)

SENSOR_VN.

◆ PIN_DISP_CLK

#define PIN_DISP_CLK   (14)

◆ PIN_DISP_CS

#define PIN_DISP_CS   (15)

◆ PIN_DISP_DC

#define PIN_DISP_DC   (12)

MTDI strapping pin: must not be high at reset.

◆ PIN_DISP_MISO

#define PIN_DISP_MISO   (-1)

write-only panel

◆ PIN_DISP_MOSI

#define PIN_DISP_MOSI   (13)

◆ PIN_DISP_RST

#define PIN_DISP_RST   (2)

◆ PIN_EXPANDER_INT

#define PIN_EXPANDER_INT   (35)

PI4IOE5V9554A INT.

◆ PIN_I2C_SCL

#define PIN_I2C_SCL   (33)

◆ PIN_I2C_SDA

#define PIN_I2C_SDA   (32)

◆ PIN_I2S_BCLK

#define PIN_I2S_BCLK   (26)

◆ PIN_I2S_DOUT

#define PIN_I2S_DOUT   (27)

◆ PIN_I2S_WS

#define PIN_I2S_WS   (25)

LRCK.

◆ PIN_POT_ADC

#define PIN_POT_ADC   (36)

◆ PIN_REG_EN

#define PIN_REG_EN   (4)

EnableReg.

◆ PIN_SD_CLK

#define PIN_SD_CLK   (18)

◆ PIN_SD_CS

#define PIN_SD_CS   (5)

◆ PIN_SD_DETECT

#define PIN_SD_DETECT   (21)

◆ PIN_SD_MISO

#define PIN_SD_MISO   (19)

◆ PIN_SD_MOSI

#define PIN_SD_MOSI   (23)

◆ PIN_USB_DIR

#define PIN_USB_DIR   (22)

PI3USB221AZUAEX USB mux select.

◆ POT_ADC_CHANNEL

#define POT_ADC_CHANNEL   ADC_CHANNEL_0

ADC1.