In development. It changes without notice.
Topic
Build Configuration
What the board being built has, as constants.
Each board declares its parts (its screen, its keys, its sound, its clock, its sleep) in one header. What it does not declare reads as absent, and the rest of the firmware asks the constants of device:: and never the declaration.
The builds. Every board has an open build for everyday use, and a release build that also writes no log, fails to compile with a serial console in it, and refuses a portal access point that is not WPA3-only instead of only logging it. Two more builds are for development and never go to a person: one with a serial console (Serial Debug Console) and a single round of key derivation, so tests unlock at once, and one with the same console and the full key derivation, to time the work and size the tasks as a person's board does it. A hardened build needs 8 MB of flash or more. An open build can be flashed again and again. A hardened one turns on Secure Boot v2 and flash encryption at its first boot, for good, and is the only one that closes the chip's debug port.
- See also
- Board Configurations, The boards
Files | |
| file | src/ |
Compile-time device configuration exposed as device:: constants. | |
| file | src/ |
| Safe fallback values for every variant feature flag. | |
Macros | |
| #define | VAULT_ |
| Host / native builds: no view compiles. | |
| #define | VAULT_ |
| NarrowVaultView — 135 px pager + pill. | |
| #define | VAULT_ |
| WideVaultView — tab bar + action bar. | |
| #define | VAULT_ |
| KeyboardVaultView — KeyboardPanel. | |
| #define | BOARD_ |
| #define | BOARD_ |
| The PMIC switches the board off and its power key powers it back on. | |
| #define | BOARD_ |
| Dropping the power-hold pin cuts the supply; on USB the ESP deep-sleeps instead. | |
| #define | BOARD_ |
| The ESP deep-sleeps, its RTC domain keeps time, and a wake pin brings it back. | |
| #define | AUDIO_ |
| Nothing fitted that makes a sound. | |
| #define | AUDIO_ |
| A buzzer on a GPIO: PWM tones only. | |
| #define | AUDIO_ |
| A speaker behind an I2S amplifier or codec. | |
| #define | VAULT_ |
| #define | BOARD_ |
| #define | SLEEP_ |
| #define | IDLE_ |
| #define | SLEEP_ |
| #define | DEVICE_NAME |
| Full board name, shown as the model in the info panel and the admin portal. | |
| #define | DEVICE_ |
| Short board tag, reported as the variant in the admin portal. | |
| #define | DEVICE_ID |
| #define | DISPLAY_WIDTH |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| Panel rotation at boot, in quarter turns (0..3); the fallback 0 applies none. | |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| 1 turns the controller's display inversion on at init; 0 leaves it off. | |
| #define | DISPLAY_ |
| Forwarded as the panel descriptor's readable flag (GRAM read-back support). | |
| #define | DISPLAY_ |
| 1 sets the BGR bit in the controller's MADCTL; 0 keeps RGB order. | |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| SPI mode (0..3) of the display device. | |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| 1 dims the backlight on PIN_ | |
| #define | DISPLAY_ |
| LEDC channel of the backlight PWM. | |
| #define | DISPLAY_ |
| LEDC timer of the backlight PWM. | |
| #define | DISPLAY_ |
| Backlight PWM frequency in Hz; the fallback is 5 kHz. | |
| #define | IDLE_ |
| #define | IDLE_WAIT_LIT |
| #define | DISPLAY_ |
| Backlight PWM duty resolution in bits. | |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| Lower end of the usable PMIC backlight voltage window, in millivolts. | |
| #define | DISPLAY_ |
| Upper end of the usable PMIC backlight voltage window, in millivolts. | |
| #define | PMIC_ |
| #define | PMIC_ |
| 1 when an AXP2101 rail drives the backlight (DLDO1 on the CoreS3 SE). | |
| #define | PMIC_ |
| AXP192 backlight rail: 0 => LDO2 (reg 0x28 high nibble), 1 => DC3 (reg 0x27). | |
| #define | PMIC_ |
| AXP192: enable LDO3 as the TFT logic rail at 3.0V (M5StickC Plus panels). | |
| #define | PMIC_ |
| AXP192: pulse the panel reset line via GPIO4 during prepare (M5Core2 ILI9342). | |
| #define | PMIC_ |
| AXP2101: write the board's LDO rails (reg 0x90) during prepare (CoreS3 SE). | |
| #define | PMIC_ |
| 1 when EXTEN enables a 5 V boost nothing here needs (Grove / M-Bus 5 V out). | |
| #define | PMIC_ |
| 1 when DC-DC2 feeds nothing (its pins unconnected on every AXP192 board here). | |
| #define | PMIC_ |
| 1 when DC-DC3 feeds nothing (its pins unconnected on the StickC Plus boards). | |
| #define | PMIC_ |
| 1 when LDO3 feeds a load nothing here drives (the Core2's vibration motor). | |
| #define | PMIC_ |
| 1 when GPIO0 / LDOio0 feeds a part nothing here uses (the StickC Plus microphone). | |
| #define | PMIC_ |
| 1 when GPIO1 sinks a load nothing here drives (the Core2's green LED). | |
| #define | DISPLAY_ |
| #define | AW9523_ |
| 7-bit I2C address of that AW9523B expander (0x58 on the CoreS3 SE); 0 = none. | |
| #define | DISPLAY_ |
| SPI clock in Hz for panel writes; the fallback is 40 MHz. | |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| #define | DISPLAY_ |
| 1 for a 1-bit black/white panel: the UI device profile renders Mono1, not RGB565. | |
| #define | DISPLAY_ |
| #define | HAS_AXP2101 |
| #define | HAS_M5PM1 |
| 1 selects the M5PM1 (PY32) PMIC path, PowerManagerM5PM1 (StickS3). | |
| #define | PMIC_I2C_ADDR |
| #define | M5PM1_IRQ_PIN |
| #define | HAS_ |
| 1 when a BM8563 I2C RTC keeps wall time; 0 keeps time on the ESP32 internal RTC. | |
| #define | RTC_I2C_ADDR |
| #define | HAS_IMU |
| 1 when the board fits an IMU: enables shake-to-lock and its sensitivity setting. | |
| #define | IMU_ |
| #define | IMU_ |
| 1 compiles the MPU6886 driver into the createImu probe factory (StickC Plus 1.1, Plus2). | |
| #define | IMU_ |
| #define | HAS_ |
| #define | IMU_I2C_ADDR |
| 7-bit I2C address the createImu probe factory reads; 0 = no IMU. | |
| #define | IMU_INT1_PIN |
| #define | AUDIO_OUTPUT |
| #define | AUDIO_ |
| #define | AUDIO_ |
| #define | AUDIO_ |
| 7-bit I2C address handed to the codec factory (0x18 for the ES8311). | |
| #define | AUDIO_ |
| #define | AUDIO_ |
| 1 selects the AW88298 smart-amplifier driver at AUDIO_ | |
| #define | AUDIO_ |
| 7-bit I2C address of the AW88298 smart amplifier (0x36 on the CoreS3 SE). | |
| #define | AUDIO_ |
| Optional AW9523B I/O expander that holds the amplifier's reset, RSTN (0 = none). | |
| #define | AUDIO_ |
| #define | AUDIO_ |
| #define | PIN_ |
| Enable GPIO of an AUDIO_ | |
| #define | AUDIO_ |
| 1 when PIN_ | |
| #define | AUDIO_ |
| I2S controller index of the speaker path; -1 = no I2S output. | |
| #define | PIN_ |
| I2S master-clock GPIO of the speaker path; -1 = not used. | |
| #define | PIN_ |
| I2S bit-clock GPIO of the speaker path; -1 = not used. | |
| #define | PIN_AUDIO_WS |
| I2S word-select GPIO of the speaker path; -1 = not used. | |
| #define | PIN_ |
| I2S data-out GPIO of the speaker path; -1 = no I2S output (see AUDIO_ | |
| #define | PIN_AUDIO_DIN |
| I2S data-in GPIO of the speaker path; -1 = not used. | |
| #define | PIN_ |
| GPIO that drives an AUDIO_ | |
| #define | AUDIO_HAS_I2S |
| #define | HAS_PSRAM |
| #define | KLEIDOS_ |
| #define | KLEIDOS_ |
| #define | KLEIDOS_ |
| #define | KLEIDOS_ |
| #define | HAS_ |
| #define | HAS_ |
| #define | HAS_KEYBOARD |
| #define | KEYBOARD_ |
| 1 compiles the NXP TCA8418 matrix-controller driver (Cardputer ADV, 0x34). | |
| #define | KEYBOARD_ |
| 1 compiles the LilyGo ESP32-C3 I2C keyboard-slave driver (T-Deck, 0x55). | |
| #define | HAS_ |
| #define | HAS_TRACKBALL |
| 1 when the board has a trackball (T-Deck). | |
| #define | TRACKBALL_ |
| #define | HAS_TOUCH |
| 1 when the board has a touchscreen (T-Deck GT911, Core2 v1.3 and CoreS3 SE FT6x36). | |
| #define | TOUCH_ |
| #define | TOUCH_ |
| 1 when the FT6x36 panel is TALLER than the display and the three A/B/C controls are a strip of it below the glass; 0 when the panel covers the display only and the zones have to be a band of the screen itself. | |
| #define | TOUCH_ |
| 7-bit I2C address of the FT6x36 touch controller (0x38); 0 = none. | |
| #define | HAS_SDCARD |
| 1 when the board has an SD card slot; compiles the SD card support. | |
| #define | SDCARD_ |
| #define | SDCARD_ |
| SD SPI clock in kHz, measured per board rather than assumed. | |
| #define | NO_OTA |
| #define | PIN_BTN_A |
| #define | PIN_BTN_B |
| #define | PIN_BTN_C |
| Face button C GPIO; -1 when absent or a touch zone (HAS_ | |
| #define | PIN_ |
| #define | PIN_ |
| Top user-button GPIO (CoreInk, where it is the lock button); -1 = none. | |
| #define | PIN_ |
| Status LED GPIO, driven to its off level by the power manager; -1 = no LED. | |
| #define | STATUS_ |
| 1 when the status LED lights on a LOW level, so its off level is HIGH. | |
| #define | PIN_ |
| GPIO of a power button wired to the ESP32 (Plus2 G35, CoreInk G27); -1 = none. | |
| #define | POWER_ |
| 1 when PIN_ | |
| #define | PIN_BAT_ADC |
| ADC GPIO that senses the battery through a divider; -1 = none. | |
| #define | BAT_ |
| #define | BAT_ |
| Denominator of the battery divider ratio (see BAT_ | |
| #define | PIN_I2C_SDA |
| SDA GPIO of the internal I2C bus; -1 = not configured. | |
| #define | PIN_I2C_SCL |
| SCL GPIO of the internal I2C bus; -1 = not configured. | |
| #define | PIN_I2C_PORT |
| I2C controller port of the internal bus; -1 = not configured. | |
| #define | PIN_ |
| #define | KEYBOARD_ |
| #define | PIN_TFT_BL |
| Older name for the backlight GPIO; PIN_ | |
| #define | PIN_RADIO_CS |
| #define | PIN_RADIO_RST |
| LoRa radio reset GPIO, held LOW to keep the unused radio in reset; -1 = none. | |
| #define | PIN_ |
| LoRa radio BUSY GPIO, parked as a pulled-down input; -1 = none. | |
| #define | PIN_ |
| LoRa radio DIO1 GPIO, parked as a pulled-down input; -1 = none. | |
| #define | PIN_GPS_TX |
| TX GPIO of the GPS UART; -1 = no GPS wiring. | |
| #define | PIN_GPS_RX |
| RX GPIO of the GPS UART; -1 = no GPS wiring. | |
| #define | HAS_GPS |
| #define | PIN_ |
| ES7210 MCLK GPIO, parked as a pulled-down input; -1 = none. | |
| #define | PIN_ |
| ES7210 SCK GPIO, parked as a pulled-down input; -1 = none. | |
| #define | PIN_ |
| ES7210 LRCK GPIO, parked as a pulled-down input; -1 = none. | |
| #define | PIN_ |
| ES7210 data GPIO, parked as a pulled-down input; -1 = none. | |
| #define | ES7210_ |
| I2C address of the unused ES7210 (7-bit); -1 when absent or not on the bus. | |
| #define | PIN_IR_TX |
| IR emitter GPIO, driven and held at its inactive level; -1 = no IR LED. | |
| #define | IR_ |
| 1 when the IR LED lights on a HIGH level, so its idle level is LOW. | |
| #define | PIN_ |
| #define | GPS_BAUD_RATE |
| #define | PIN_SDCARD_CS |
| SD card chip-select GPIO; -1 = no SD card. | |
| #define | PIN_SPI_SCK |
| SCK GPIO of the SD card's SPI bus; -1 = none. | |
| #define | PIN_SPI_MISO |
| MISO GPIO of the SD card's SPI bus; -1 = none. | |
| #define | PIN_SPI_MOSI |
| MOSI GPIO of the SD card's SPI bus; -1 = none. | |
| #define | PIN_TFT_CS |
| Older name for the display chip-select GPIO; PIN_ | |
| #define | PIN_TFT_DC |
| Older name for the display data/command GPIO; PIN_ | |
| #define | PIN_ |
| Display SPI clock GPIO; -1 = no SPI panel. | |
| #define | PIN_ |
| Display SPI MISO GPIO; -1 = no separate MISO line. | |
| #define | PIN_ |
| Display SPI MOSI GPIO; -1 = no SPI panel. | |
| #define | PIN_ |
| Display chip-select GPIO; the fallback is PIN_TFT_CS. | |
| #define | PIN_ |
| Display data/command GPIO; the fallback is PIN_TFT_DC. | |
| #define | PIN_ |
| #define | PIN_ |
| E-paper BUSY GPIO (CoreInk); -1 = none. | |
| #define | PIN_ |
| #define | PIN_TOUCH_INT |
| Touch-controller interrupt GPIO (GT911 on the T-Deck); -1 = none. | |
| #define | PIN_ |
| Trackball up GPIO; -1 = no trackball. | |
| #define | PIN_ |
| Trackball down GPIO; -1 = no trackball. | |
| #define | PIN_ |
| Trackball left GPIO; -1 = no trackball. | |
| #define | PIN_ |
| Trackball right GPIO; -1 = no trackball. | |
| #define | PIN_ |
| Trackball center-press GPIO (the BOOT pin on the T-Deck); -1 = no trackball. | |
| #define | POWER_ |
| Production-sleep draw measured at the cell, uA; 0 = never measured. | |
| #define | HAS_ |
| 1 when VAULT_ | |
| #define | HAS_ |
| 1 when VAULT_ | |
Enumerations | |
| enum class | kleidos:: |
| The audio output a board can carry, named by the part (AUDIO_OUTPUT in variant.h). More about kleidos:: | |
| enum class | kleidos:: |
Variables | |
| constexpr const char * | kleidos:: |
| Full human-readable board name. | |
| constexpr const char * | kleidos:: |
| Short model code / marketing name. | |
| constexpr uint8_t | kleidos:: |
| Numeric variant id. | |
| constexpr int16_t | kleidos:: |
| Active display width in pixels. | |
| constexpr int16_t | kleidos:: |
| Active display height in pixels. | |
| constexpr int16_t | kleidos:: |
| Center X in pixels. | |
| constexpr int16_t | kleidos:: |
| Center Y in pixels. | |
| constexpr uint8_t | kleidos:: |
| Logical rotation in quarter turns (0..3). | |
| constexpr int16_t | kleidos:: |
| Physical panel diagonal in 0.1 mm units (PPI-aware sizing). | |
| constexpr int16_t | kleidos:: |
| Viewing distance in 0.1 mm (0 = band reference). | |
| constexpr int16_t | kleidos:: |
| Memory columns shown, at MADCTL 0. | |
| constexpr int16_t | kleidos:: |
| Memory rows shown, at MADCTL 0. | |
| constexpr int16_t | kleidos:: |
| First memory column shown, at MADCTL 0. | |
| constexpr int16_t | kleidos:: |
| First memory row shown, at MADCTL 0. | |
| constexpr uint8_t | kleidos:: |
| Panel rotation relative to active area. | |
| constexpr bool | kleidos:: |
| Invert panel colors. | |
| constexpr bool | kleidos:: |
| Panel supports GRAM read-back. | |
| constexpr bool | kleidos:: |
| True if panel uses BGR color order. | |
| constexpr bool | kleidos:: |
| True if SPI bus is shared 3-wire (no MISO). | |
| constexpr uint8_t | kleidos:: |
| SPI mode (0..3). | |
| constexpr uint8_t | kleidos:: |
| SPI host index. | |
| constexpr bool | kleidos:: |
| True if display bus is shared with SD. | |
| constexpr bool | kleidos:: |
| True if backlight uses LEDC PWM. | |
| constexpr uint8_t | kleidos:: |
| LEDC channel for the backlight. | |
| constexpr uint8_t | kleidos:: |
| LEDC timer index. | |
| constexpr uint32_t | kleidos:: |
| LEDC frequency in Hz. | |
| constexpr uint8_t | kleidos:: |
| LEDC resolution in bits. | |
| constexpr uint8_t | kleidos:: |
| LEDC duty offset. | |
| constexpr uint16_t | kleidos:: |
| Backlight rail min voltage (mV). | |
| constexpr uint16_t | kleidos:: |
| Backlight rail max voltage (mV). | |
| constexpr bool | kleidos:: |
| True if AXP192 controls the backlight rail. | |
| constexpr bool | kleidos:: |
| True if AXP2101 controls the backlight rail. | |
| constexpr bool | kleidos:: |
| True if AXP192 backlight uses DC3. | |
| constexpr bool | kleidos:: |
| True if AXP192 logic is on LDO3. | |
| constexpr bool | kleidos:: |
| True if AXP192 reset is on GPIO4. | |
| constexpr bool | kleidos:: |
| True if AXP2101 writes the board's LDO rails. | |
| constexpr bool | kleidos:: |
| EXTEN 5 V boost unused. | |
| constexpr bool | kleidos:: |
| DC-DC2 rail unused. | |
| constexpr bool | kleidos:: |
| DC-DC3 rail unused. | |
| constexpr bool | kleidos:: |
| LDO3 load unused. | |
| constexpr bool | kleidos:: |
| GPIO0 / LDOio0 load unused. | |
| constexpr bool | kleidos:: |
| constexpr bool | kleidos:: |
| True if the speaker amplifier's shutdown pin is the AXP192's GPIO2, held low until a tone. | |
| constexpr uint8_t | kleidos:: |
| AW9523B I2C address (0 if absent). | |
| constexpr bool | kleidos:: |
| True if LCD reset is behind AW9523B. | |
| constexpr uint32_t | kleidos:: |
| SPI write clock in Hz. | |
| constexpr uint32_t | kleidos:: |
| SPI read clock in Hz. | |
| constexpr bool | kleidos:: |
| True if the panel is ST7789. | |
| constexpr bool | kleidos:: |
| True if the panel is ILI9342. | |
| constexpr bool | kleidos:: |
| True if the panel is GDEW0154M09. | |
| constexpr bool | kleidos:: |
| True if the panel is GDEW0154D67. | |
| constexpr bool | kleidos:: |
| True if the panel is monochrome. | |
| constexpr bool | kleidos:: |
| True if e-paper background is paper-white. | |
| constexpr bool | kleidos:: |
| constexpr AudioOutput | kleidos:: |
| The audio output this board carries, whether or not the firmware drives it. | |
| constexpr bool | kleidos:: |
| constexpr bool | kleidos:: |
| True if the audio codec is ES8311. | |
| constexpr uint8_t | kleidos:: |
| Audio codec I2C address. | |
| constexpr int | kleidos:: |
| constexpr bool | kleidos:: |
| True if the board has an I2S transmit path (port and data-out pin), with or without a codec. | |
| constexpr bool | kleidos:: |
| True if PSRAM is present and enabled. | |
| constexpr bool | kleidos:: |
| True if the board has an IMU. | |
| constexpr bool | kleidos:: |
| True if the IMU is QMI8658. | |
| constexpr bool | kleidos:: |
| True if the IMU is MPU6886. | |
| constexpr bool | kleidos:: |
| True if the IMU is BMI270. | |
| constexpr bool | kleidos:: |
| True if the IMU exposes an interrupt line. | |
| constexpr bool | kleidos:: |
| True if the board has a BM8563 RTC. | |
| constexpr bool | kleidos:: |
| True if the board has an AXP2101 PMIC. | |
| constexpr bool | kleidos:: |
| True if the board has an M5PM1 expansion PMIC. | |
| constexpr bool | kleidos:: |
| constexpr bool | kleidos:: |
| True if the keyboard has a dimmable backlight (feature gate for its level setting). | |
| constexpr bool | kleidos:: |
| True if the board has a trackball. | |
| constexpr bool | kleidos:: |
| True if the board has a touch controller. | |
| constexpr bool | kleidos:: |
| True if the touch controller is FT6X36. | |
| constexpr bool | kleidos:: |
| constexpr int16_t | kleidos:: |
| Height in px of the on-screen A/B/C band, on a board whose touch surface covers the display only. | |
| constexpr int16_t | kleidos:: |
| First raw panel row that belongs to the A/B/C zones, not the pointer. | |
| constexpr bool | kleidos:: |
| True if the board has an SD card slot. | |
| constexpr uint8_t | kleidos:: |
| SPI host index for the SD card. | |
| constexpr uint32_t | kleidos:: |
| SD SPI clock (kHz), measured per board. | |
| constexpr int | kleidos:: |
| Face button A GPIO. | |
| constexpr int | kleidos:: |
| Face button B GPIO. | |
| constexpr int | kleidos:: |
| constexpr bool | kleidos:: |
| constexpr int | kleidos:: |
| Board power-on GPIO. | |
| constexpr int | kleidos:: |
| Generic user button GPIO. | |
| constexpr int | kleidos:: |
| Status LED GPIO. | |
| constexpr bool | kleidos:: |
| True if status LED is active-low. | |
| constexpr int | kleidos:: |
| Power button GPIO. | |
| constexpr bool | kleidos:: |
| True if power button is active-low. | |
| constexpr int | kleidos:: |
| Battery sense ADC GPIO. | |
| constexpr int | kleidos:: |
| Battery divider numerator. | |
| constexpr int | kleidos:: |
| Battery divider denominator. | |
| constexpr int | kleidos:: |
| Internal I2C SDA GPIO. | |
| constexpr int | kleidos:: |
| Internal I2C SCL GPIO. | |
| constexpr int | kleidos:: |
| Internal I2C port index. | |
| constexpr int | kleidos:: |
| Keyboard interrupt GPIO. | |
| constexpr int | kleidos:: |
| TFT backlight GPIO (alias). | |
| constexpr int | kleidos:: |
| TFT chip-select GPIO (alias). | |
| constexpr int | kleidos:: |
| TFT data/command GPIO (alias). | |
| constexpr int | kleidos:: |
| Display SPI SCK GPIO. | |
| constexpr int | kleidos:: |
| Display SPI MISO GPIO. | |
| constexpr int | kleidos:: |
| Display SPI MOSI GPIO. | |
| constexpr int | kleidos:: |
| Display SPI CS GPIO. | |
| constexpr int | kleidos:: |
| Display SPI D/C GPIO. | |
| constexpr int | kleidos:: |
| Display reset GPIO. | |
| constexpr int | kleidos:: |
| E-paper busy GPIO. | |
| constexpr int | kleidos:: |
| Display backlight GPIO. | |
| constexpr int | kleidos:: |
| Radio chip-select GPIO. | |
| constexpr int | kleidos:: |
| Radio reset GPIO. | |
| constexpr int | kleidos:: |
| Radio busy GPIO. | |
| constexpr int | kleidos:: |
| Radio IRQ DIO1 GPIO. | |
| constexpr int | kleidos:: |
| GPS TX GPIO. | |
| constexpr int | kleidos:: |
| GPS RX GPIO. | |
| constexpr bool | kleidos:: |
| GPS receiver present (feature gate). | |
| constexpr uint32_t | kleidos:: |
| GPS UART baud (per-variant; hardware-set). | |
| constexpr int | kleidos:: |
| Audio master clock GPIO. | |
| constexpr int | kleidos:: |
| audio bit clock GPIO. | |
| constexpr int | kleidos:: |
| audio word-select GPIO. | |
| constexpr int | kleidos:: |
| audio data-out GPIO. | |
| constexpr int | kleidos:: |
| audio data-in GPIO. | |
| constexpr int | kleidos:: |
| GPIO of a buzzer (-1 if none). | |
| constexpr int | kleidos:: |
| Unused ES7210 mic MCLK GPIO (-1 if none). | |
| constexpr int | kleidos:: |
| Unused ES7210 mic SCK GPIO (-1 if none). | |
| constexpr int | kleidos:: |
| Unused ES7210 mic LRCK GPIO (-1 if none). | |
| constexpr int | kleidos:: |
| Unused ES7210 mic DIN GPIO (-1 if none). | |
| constexpr int | kleidos:: |
| Unused ES7210 I2C address (-1 if absent). | |
| constexpr int | kleidos:: |
| Unused IR TX LED GPIO (-1 if none). | |
| constexpr bool | kleidos:: |
| IR LED drive polarity (true=active-high). | |
| constexpr int | kleidos:: |
| Unused RGB LED data GPIO (-1 if none). | |
| constexpr int | kleidos:: |
| SD card chip-select GPIO. | |
| constexpr int | kleidos:: |
| Shared SPI SCK GPIO. | |
| constexpr int | kleidos:: |
| Shared SPI MISO GPIO. | |
| constexpr int | kleidos:: |
| Shared SPI MOSI GPIO. | |
| constexpr int | kleidos:: |
| M5PM1 IRQ GPIO. | |
| constexpr int | kleidos:: |
| IMU interrupt-1 GPIO. | |
| constexpr int | kleidos:: |
| Touch interrupt GPIO. | |
| constexpr int | kleidos:: |
| Trackball up GPIO. | |
| constexpr int | kleidos:: |
| Trackball down GPIO. | |
| constexpr int | kleidos:: |
| Trackball left GPIO. | |
| constexpr int | kleidos:: |
| Trackball right GPIO. | |
| constexpr int | kleidos:: |
| Trackball click GPIO. | |
| constexpr SleepMode | kleidos:: |
| How this board sleeps, as its variant.h declares (BOARD_ | |
| constexpr auto | kleidos:: |
| GPIOs that wake the board from ESP deep sleep, every one active-low. | |
| constexpr bool | kleidos:: |
| True where only the reset button or a power cycle ends the deep sleep. | |
| constexpr auto | kleidos:: |
| Active-low GPIOs that end the main loop's idle wait, every one an input. | |
| constexpr uint32_t | kleidos:: |
| constexpr bool | kleidos:: |
| constexpr uint8_t | kleidos:: |
| PMIC I2C address. | |
| constexpr uint8_t | kleidos:: |
| RTC I2C address. | |
| constexpr uint8_t | kleidos:: |
| IMU I2C address. | |
| constexpr uint8_t | kleidos:: |
| Keyboard I2C address. | |
| constexpr uint8_t | kleidos:: |
| Touch controller I2C address. | |
Macro Definition Documentation
AUDIO_ AMP_ AXP192_ GPIO2 #
I2S amplifier (NS4168, Core2) whose shutdown pin is on AXP192 PMIC GPIO2. 1 selects the Axp192Amp driver, which reaches the PMIC at PMIC_
AUDIO_ AMP_ GPIO #
Analog amplifier (NS4150B, NS4168) gated by a plain GPIO enable line. 1 selects the GpioAmp driver on PIN_
AUDIO_ AMP_ PMIC_ PYG3 #
1 when the speaker amplifier's enable line is M5PM1 PYG3 (StickS3 AW8737A); the speaker HAL switches it through the PMIC.
AUDIO_ CODEC_ ES8311 #
1 compiles the ES8311 I2C codec driver, programmed at AUDIO_
AUDIO_HAS_I2S #
Computed: the board has a usable I2S transmit path (port + data-out pin), independent of whether a separate codec is present. Codec-less smart amps (AW88298) stream directly to the amplifier over this path.
AUDIO_OUTPUT #
The fitted audio output, AUDIO_
AUDIO_ OUTPUT_ DRIVEN #
1 when this firmware drives the fitted output: compiles the speaker HAL (PWM tones into a buzzer, or samples over I2S) behind the UI sounds, the settings row and the portal's beep. A board whose output the firmware leaves alone sets 0; nothing can be driven where nothing is fitted.
BAT_ ADC_ RATIO_ NUMERATOR #
Numerator of the battery divider ratio: battery mV = PIN_BAT_ADC mV times NUMERATOR / DENOMINATOR, as the CoreInk power manager reads it. The fallback 2 / 1 undoes a 1:2 divider.
BOARD_ SLEEP_ MODE #
How this board sleeps, one of the BOARD_
BOARD_ SLEEP_ MODE_ NONE #
Host / native builds: no board, no sleep.
DEVICE_ID #
Numeric variant id. Board factories and board-specific HAL units compile on DEVICE_ID == N; the fallback 0 matches none of them.
DISPLAY_ BACKLIGHT_ PWM_ OFFSET #
Backlight duty floor in 1/255 of full scale: brightness 1..100 percent maps between this floor and full duty, 0 turns it off. The fallback 0 sets no floor.
DISPLAY_ BUS_ SHARED #
1 when the display's SPI bus is shared with other devices (the SD card on the Core boards); forwarded as the bus descriptor's busShared flag.
DISPLAY_ DIAGONAL_ MM_ X10 #
Physical panel diagonal in 0.1 mm units. Unset on unregistered/
DISPLAY_ FREQ_ READ_ HZ #
SPI clock in Hz for panel register read-back; the fallback is 6 MHz. The ST7789 and ILI9342 serial interfaces specify a read cycle of at least 150 ns (6.67 MHz). Faster reads come back one bit late on the classic Sticks, whose panel pins reach the SPI peripheral through the GPIO matrix (RDDID 0x42 0xC2 0xC2 at 10 and 16 MHz instead of 0x85 0x85 0x52).
DISPLAY_ HEIGHT #
Logical display height in pixels, after DISPLAY_
DISPLAY_ OFFSET_ ROTATION #
Quarter turns added (mod 4) to the requested rotation before the controller is programmed; the fallback 0 adds none.
DISPLAY_ OFFSET_ X #
First controller memory column the panel shows, at MADCTL 0. A rotation that mirrors the columns starts the window at memory - panel - offset instead (drivers/
DISPLAY_ OFFSET_ Y #
First controller memory row the panel shows, at MADCTL 0. A rotation that mirrors the rows starts the window at memory - panel - offset instead (drivers/
DISPLAY_ PANEL_ HEIGHT #
Controller memory rows the panel shows, in the controller's own orientation (MADCTL 0, before any rotation); the fallback is DISPLAY_
DISPLAY_ PANEL_ WIDTH #
Controller memory columns the panel shows, in the controller's own orientation (MADCTL 0, before any rotation); the fallback is DISPLAY_
DISPLAY_ PAPER_ WHITE_ BACKGROUND #
Paper-white background flag, declared 1 by the CoreInk e-paper; re-exported as device::
DISPLAY_ RESET_ AW9523 #
1 when the LCD reset line sits on an AW9523B I/O expander (CoreS3 SE): the expander at AW9523_
DISPLAY_ SPI_ 3WIRE #
1 when the panel shares one data line for writes and read-back, so its SPI device runs half-duplex 3-wire; 0 = standard 4-wire SPI.
DISPLAY_ SPI_ HOST #
SPI host of the display bus: 2 = SPI2, 3 = SPI3. Any other value (the fallback 0) lets display_
DISPLAY_ TYPE_ GDEW0154D67 #
1 for a GoodDisplay GDEW0154D67 (SSD1681) 200x200 e-paper (CoreInk): compiles the e-paper HAL with that controller.
DISPLAY_ TYPE_ GDEW0154M09 #
1 for a GoodDisplay GDEW0154M09 (JD79653A) 200x200 e-paper: compiles the e-paper HAL with that controller.
DISPLAY_ TYPE_ ILI9342 #
1 when the panel controller is an ILI9342: compiles the color SPI TFT HAL and selects the Ili9342 controller driver.
DISPLAY_ TYPE_ ST7789 #
1 when the panel controller is an ST7789: compiles the color SPI TFT HAL and selects the St7789 controller driver.
DISPLAY_ VIEW_ DISTANCE_ MM_ X10 #
Typical viewing distance in 0.1 mm units, 0 = the density band's reference distance. Legibility is ANGULAR (arcmin, not px): a board held farther than its band's reference device needs proportionally larger text for the same retinal size, so a non-zero value here scales the resolved type ladder by distance / band-reference (see DeviceProfile::
DISPLAY_WIDTH #
Logical display width in pixels, after DISPLAY_
GPS_BAUD_RATE #
GPS UART baud tried first by the receiver probe; the fallback 9600 is the generic factory default (the T-Deck Plus module runs at 38400).
HAS_AXP2101 #
1 selects the AXP-family PMIC path (PowerManagerAXP2101, PMIC backlight). It also serves the AXP192 boards: the chip is identified at runtime by its ID probe.
HAS_ GPIO_ POWER #
1 when peripheral power is a GPIO-switched rail rather than a PMIC (T-Deck, PIN_
HAS_GPS #
1 when the board may carry a GPS receiver (T-Deck Plus): enables GPS time sync and its re-detect setting. A board without the module times the sync out cleanly.
HAS_ IMU_ INTERRUPT #
1 when the IMU interrupt line is wired (the StickS3 routes INT1 through M5PM1 PYG4); 0 = poll-only. Re-exported as device::
HAS_KEYBOARD #
1 when the board has a physical QWERTY keyboard: selects the passphrase auth UI, and must agree with VAULT_
HAS_ KEYBOARD_ BACKLIGHT #
1 when the board's keyboard has a backlight the controller can dim: offers the keyboard-light level setting. NOT implied by HAS_KEYBOARD — the Cardputer ADV's TCA8418 drives no LEDs, so its controller leaves the base no-op in place.
HAS_PSRAM #
1 when the board fits external PSRAM; the admin hardware inventory reports it beside the runtime probe.
HAS_ THIRD_ BUTTON #
Third face button (BtnC). A hardware fact, independent of the vault-menu layout selected above: it may be a GPIO key (CoreInk dial DOWN) or a capacitive zone (Core2 v1.3 / CoreS3 SE), so PIN_BTN_C is NOT a proxy — both touch boards declare PIN_BTN_C -1 and still have a third button. Tied to board_<x>.cpp's .btnC wiring by thirdButtonSlot() in hal/
IDLE_WAIT_LIT #
Whether the main loop may wait out an idle stretch with the panel lit (1), or only in the dark (0). 0 for a board with an input a lit screen answers that neither wakes the chip nor latches itself until read.
IDLE_ WAIT_ MAX_ MS #
Longest idle wait of the main loop the board's polled inputs allow, ms; 0 sets no bound. A board with an input read only by polling its instantaneous state (no latch, no wake pin) bounds it under the shortest press, so a press can never begin and end inside one wait.
IDLE_ WAKE_ PINS #
Active-low GPIOs that end the main loop's idle wait at once, and wake the chip from the automatic light sleep it takes there: every input of the board on a GPIO of its own. Every variant.h declares it; a build with no variant.h has no board and an empty list.
IMU_INT1_PIN #
ESP32 GPIO wired to the IMU's INT1; -1 when INT1 does not reach an ESP32 GPIO (the StickS3 routes it through M5PM1 PYG4). Re-exported as device::
IMU_ TYPE_ BMI270 #
1 compiles the BMI270 driver and its configuration image into the createImu probe factory (StickS3, Cardputer ADV, Core2 v1.3).
IMU_ TYPE_ QMI8658 #
1 lets the createImu probe factory recognize a QMI8658; no driver is built for it, so the probe logs it and falls back to NullImu.
KEYBOARD_ I2C_ ADDR #
7-bit I2C address of the keyboard controller; the fallback 0x55 is the T-Deck's ESP32-C3 keyboard slave.
KLEIDOS_ LIVE_ FRAMEBUFFER #
Live shadow framebuffer for the color SPI panels: drawing primitives compose into a RAM buffer inside a frameBegin/
KLEIDOS_ RENDER_ STATS #
Render instrumentation: per-frame blit timing, region/byte counters exposed over the serial debug console. Gated behind the diagnostics build so production firmware pays neither the counters nor the timestamp reads. Defaults to 1 only when both DEBUG_
KLEIDOS_ SCREENSHOT_ FRAMEBUFFER #
1 keeps the panel driver's RAM shadow buffer for the screenshot read-back path. Defaults to 1 with the serial debug console (DEBUG_
KLEIDOS_ SHADOW_ FRAMEBUFFER #
The driver's RAM shadow buffer backs either the screenshot read-back path or the live-flush render path (or both); allocate it when either is enabled.
M5PM1_IRQ_PIN #
ESP32 GPIO wired to the M5PM1 IRQ output (GPIO13 on the StickS3); -1 = none. Re-exported as device::
NO_OTA #
1 on 4 MB single-app-slot boards: the admin portal registers no OTA routes and the settings report the board as neither OTA- nor Secure-Boot-capable.
PIN_ BOARD_ POWERON #
GPIO driven HIGH at boot to hold board or peripheral power (Plus2 and CoreInk power hold, T-Deck peripheral rail); -1 = none.
PIN_BTN_A #
Face button A GPIO, which the Stick and Cardputer power managers also arm as the deep-sleep wake pin; -1 when A is a touch zone. The fallback 37 is the StickC Plus BtnA.
PIN_BTN_B #
Face button B GPIO; -1 when the board has none or B is a touch zone. The fallback 39 is the StickC Plus side button.
PIN_ DISPLAY_ BL #
Display backlight GPIO; -1 when a PMIC rail drives the backlight or there is none. The fallback is PIN_TFT_BL.
PIN_ DISPLAY_ RST #
Display reset GPIO; -1 when the reset is not on a GPIO (PMIC or I/O expander) or not wired.
PIN_ KEYBOARD_ INT #
Keyboard-controller interrupt GPIO (active low). -1 = none. Not a deep-sleep wake source: the T-Deck's (GPIO46) is not an RTC GPIO; SLEEP_
PIN_RADIO_CS #
LoRa radio chip-select GPIO (T-Deck SX1262), held HIGH so the unused radio stays off the shared SPI bus; -1 = no radio.
PIN_ RGB_ LED_ DATA #
Data GPIO of an addressable RGB LED Kleidos never lights (the Cardputer ADV's WS2812B on G21), held LOW; -1 = none.
PMIC_ BACKLIGHT_ AXP192 #
1 when an AXP192 rail drives the backlight (LDO2 on the StickC Plus 1.1 and Plus SE, DC3 on the Core2 v1.3).
PMIC_I2C_ADDR #
7-bit I2C address of the PMIC (0x34 AXP192 / AXP2101, 0x6E M5PM1); 0 disables PMIC I2C transactions.
RTC_I2C_ADDR #
7-bit I2C address of the BM8563 RTC (0x51); 0 = none, and the RTC HAL never starts its driver.
SDCARD_ SPI_ HOST #
SPI host of the SD card bus: 2 = SPI2, 3 = SPI3. Any other value (the fallback 0) lets sd_card.cpp pick the target's default host.
SLEEP_ WAKE_ PINS #
GPIOs that wake an ESP deep sleep, comma-separated and all active-low: the only wake source of BOARD_
SLEEP_ WAKE_ RESET_ ONLY #
1 where nothing but the reset button or a power cycle is meant to end the board's ESP deep sleep, so its SLEEP_
TOUCH_ TYPE_ FT6X36 #
1 for an FT6x36 capacitive panel (Core2 v1.3, CoreS3 SE): A/B/C touch zones plus the pointer; without a keyboard it selects the touch auth UI.
TOUCH_ ZONE_ STRIP_ BELOW_ DISPLAY #
1 when the FT6x36 panel is TALLER than the display and the three A/B/C controls are a strip of it below the glass; 0 when the panel covers the display only and the zones have to be a band of the screen itself.
Core2 v1.3: the screen is 320 x 240 pixels and the touch sensor 320 x 280, so the 40 pixels below the glass report Y past the display and the whole screen can be the pointer. The CoreS3 SE measures the same: a press on its printed marks reports raw Y 278. Declared per variant so the routing is a fact about the board rather than a guess the driver makes; the debug console prints the panel's observed extent to check a declaration against the glass.
TRACKBALL_ TYPE_ QUADRATURE #
Trackball family flag. Mirrors the KEYBOARD_
VAULT_ MENU_ VIEW #
The vault-menu layout this build compiles, one of the VAULT_
Enumeration Type Documentation
AudioOutput #
SleepMode #
How the board sleeps once locked and idle, the typed form of the BOARD_
Variable Documentation
kAudioI2sPort #
I2S peripheral index for the codec.
kAudioOutputDriven #
True if this firmware drives the fitted audio output: the speaker HAL is compiled and the UI sounds, the settings row and the portal's beep reach it. False where nothing is fitted, and on a board whose variant sets AUDIO_
kDisplayIsEpaper #
True for electrophoretic (e-paper) panels. These have slow full-screen refresh waveforms that flash several times per update, so the UI must use reduce-motion (static elements instead of animations) and a light theme to avoid painting an all-ink background. Gate animation code on this flag.
kHasKeyboard #
True if the board has a physical keyboard.
kHasThirdButton #
True if the board has a third face button, GPIO or touch zone — not the same fact as kPinBtnC: the touch-zone boards have a C with no pin.
kIdleWaitLit #
Whether the main loop may wait out an idle stretch with the panel lit, or only in the dark (IDLE_
kIdleWaitMaxMs #
Longest idle wait the board's polled inputs allow, ms; 0 sets no bound (IDLE_
kIdleWakePins #
Active-low GPIOs that end the main loop's idle wait, every one an input.
Each key and interrupt line the board has on a GPIO of its own: on a board built with automatic light sleep they are armed through every idle wait, as light-sleep wake sources and as interrupts that end the wait at once (light_sleep.h). Any GPIO qualifies (a light-sleep GPIO wake is not limited to the RTC GPIOs). A check of the build holds the list.
kPinBtnC #
Face button C GPIO (or -1 if absent).
kPmicAxp192UnusedGpio1 #
GPIO1 load unused.
kSleepWakePins #
GPIOs that wake the board from ESP deep sleep, every one active-low.
The only wake source of SleepMode::, the on-USB one of SleepMode:: (where the power hold cannot cut the supply), and the fallback of SleepMode:: when the PMIC does not switch off. Empty where no ESP GPIO can wake the board, and under SleepMode:: only where kSleepWakesOnResetOnly says so. A check of the build holds each one to an RTC GPIO of the board's SoC.
kSleepWakesOnResetOnly #
True where only the reset button or a power cycle ends the deep sleep.
Declared on purpose (SLEEP_ 1) by a board whose SleepMode:: arms no wake source at all: the LILYGO T-Deck, whose reset button (CHIP_PU) or slide switch ends it. Either is a chip reset, so the next boot keeps none of what a deep-sleep wake keeps (RTC memory, the RTC store registers, the RTC timer the wall clock counts on). It is what lets kSleepWakePins be empty under that mode, where an empty list is otherwise a mistake.
kTouchZoneBandPx #
Height in px of the on-screen A/B/C band, on a board whose touch surface covers the display only.
Only meaningful when kTouchZoneStripBelowDisplay is false. There the three zones cannot live anywhere but the screen, so this band of it is shared with the pointer: the zone driver claims it and the pointer yields it, so a contact is one or the other and never both. 40 px is the design system's 5 mm touch tap-target floor at this panel's density (tokens::
kTouchZoneStripBelowDisplay #
True when the A/B/C strip is a region of the touch panel BELOW the display rather than a band of the screen. See TOUCH_
kTouchZoneTopY #
First raw panel row that belongs to the A/B/C zones, not the pointer.
The one boundary both FT6x36 consumers route on: the zone driver takes every contact at or below it, the pointer every contact above it, so one finger is never both. Where the strip is below the display this is the display's own height and the pointer keeps every screen row; elsewhere it is the top of the on-screen band.