Kleidos API Search

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/config/device_config.h
Compile-time device configuration exposed as device:: constants.
file src/config/platform_defaults.h
Safe fallback values for every variant feature flag.

Macros

#defineVAULT_MENU_VIEW_NONE
Host / native builds: no view compiles.
#defineVAULT_MENU_VIEW_NARROW
NarrowVaultView — 135 px pager + pill.
#defineVAULT_MENU_VIEW_WIDE
WideVaultView — tab bar + action bar.
#defineVAULT_MENU_VIEW_KEYBOARD
KeyboardVaultView — KeyboardPanel.
#defineBOARD_SLEEP_MODE_NONE
#defineBOARD_SLEEP_MODE_PMIC_OFF
The PMIC switches the board off and its power key powers it back on.
#defineBOARD_SLEEP_MODE_HOLD_RELEASE
Dropping the power-hold pin cuts the supply; on USB the ESP deep-sleeps instead.
#defineBOARD_SLEEP_MODE_ESP_DEEP
The ESP deep-sleeps, its RTC domain keeps time, and a wake pin brings it back.
#defineAUDIO_OUTPUT_NONE
Nothing fitted that makes a sound.
#defineAUDIO_OUTPUT_BUZZER
A buzzer on a GPIO: PWM tones only.
#defineAUDIO_OUTPUT_SPEAKER
A speaker behind an I2S amplifier or codec.
#defineVAULT_MENU_VIEW
#defineBOARD_SLEEP_MODE
#defineSLEEP_WAKE_PINS
#defineIDLE_WAKE_PINS
#defineSLEEP_WAKE_RESET_ONLY
#defineDEVICE_NAME
Full board name, shown as the model in the info panel and the admin portal.
#defineDEVICE_SHORT_NAME
Short board tag, reported as the variant in the admin portal.
#defineDEVICE_ID
#defineDISPLAY_WIDTH
#defineDISPLAY_HEIGHT
#defineDISPLAY_ROTATION
Panel rotation at boot, in quarter turns (0..3); the fallback 0 applies none.
#defineDISPLAY_DIAGONAL_MM_X10
#defineDISPLAY_VIEW_DISTANCE_MM_X10
#defineDISPLAY_PANEL_WIDTH
#defineDISPLAY_PANEL_HEIGHT
#defineDISPLAY_OFFSET_X
#defineDISPLAY_OFFSET_Y
#defineDISPLAY_OFFSET_ROTATION
#defineDISPLAY_INVERT
1 turns the controller's display inversion on at init; 0 leaves it off.
#defineDISPLAY_READABLE
Forwarded as the panel descriptor's readable flag (GRAM read-back support).
#defineDISPLAY_COLOR_ORDER_BGR
1 sets the BGR bit in the controller's MADCTL; 0 keeps RGB order.
#defineDISPLAY_SPI_3WIRE
#defineDISPLAY_SPI_MODE
SPI mode (0..3) of the display device.
#defineDISPLAY_SPI_HOST
#defineDISPLAY_BUS_SHARED
#defineDISPLAY_BACKLIGHT_PWM
1 dims the backlight on PIN_DISPLAY_BL with LEDC PWM; 0 switches it as a GPIO.
#defineDISPLAY_BACKLIGHT_PWM_CHANNEL
LEDC channel of the backlight PWM.
#defineDISPLAY_BACKLIGHT_PWM_TIMER
LEDC timer of the backlight PWM.
#defineDISPLAY_BACKLIGHT_PWM_HZ
Backlight PWM frequency in Hz; the fallback is 5 kHz.
#defineIDLE_WAIT_MAX_MS
#defineIDLE_WAIT_LIT
#defineDISPLAY_BACKLIGHT_PWM_BITS
Backlight PWM duty resolution in bits.
#defineDISPLAY_BACKLIGHT_PWM_OFFSET
#defineDISPLAY_BL_MIN_MV
Lower end of the usable PMIC backlight voltage window, in millivolts.
#defineDISPLAY_BL_MAX_MV
Upper end of the usable PMIC backlight voltage window, in millivolts.
#definePMIC_BACKLIGHT_AXP192
#definePMIC_BACKLIGHT_AXP2101
1 when an AXP2101 rail drives the backlight (DLDO1 on the CoreS3 SE).
#definePMIC_BL_AXP192_RAIL_DC3
AXP192 backlight rail: 0 => LDO2 (reg 0x28 high nibble), 1 => DC3 (reg 0x27).
#definePMIC_BL_AXP192_LOGIC_LDO3
AXP192: enable LDO3 as the TFT logic rail at 3.0V (M5StickC Plus panels).
#definePMIC_BL_AXP192_RESET_GPIO4
AXP192: pulse the panel reset line via GPIO4 during prepare (M5Core2 ILI9342).
#definePMIC_BL_AXP2101_PANEL_RAILS
AXP2101: write the board's LDO rails (reg 0x90) during prepare (CoreS3 SE).
#definePMIC_AXP192_UNUSED_EXTEN
1 when EXTEN enables a 5 V boost nothing here needs (Grove / M-Bus 5 V out).
#definePMIC_AXP192_UNUSED_DCDC2
1 when DC-DC2 feeds nothing (its pins unconnected on every AXP192 board here).
#definePMIC_AXP192_UNUSED_DCDC3
1 when DC-DC3 feeds nothing (its pins unconnected on the StickC Plus boards).
#definePMIC_AXP192_UNUSED_LDO3
1 when LDO3 feeds a load nothing here drives (the Core2's vibration motor).
#definePMIC_AXP192_UNUSED_GPIO0
1 when GPIO0 / LDOio0 feeds a part nothing here uses (the StickC Plus microphone).
#definePMIC_AXP192_UNUSED_GPIO1
1 when GPIO1 sinks a load nothing here drives (the Core2's green LED).
#defineDISPLAY_RESET_AW9523
#defineAW9523_I2C_ADDR
7-bit I2C address of that AW9523B expander (0x58 on the CoreS3 SE); 0 = none.
#defineDISPLAY_FREQ_WRITE_HZ
SPI clock in Hz for panel writes; the fallback is 40 MHz.
#defineDISPLAY_FREQ_READ_HZ
#defineDISPLAY_TYPE_ST7789
#defineDISPLAY_TYPE_ILI9342
#defineDISPLAY_TYPE_GDEW0154M09
#defineDISPLAY_TYPE_GDEW0154D67
#defineDISPLAY_MONOCHROME
1 for a 1-bit black/white panel: the UI device profile renders Mono1, not RGB565.
#defineDISPLAY_PAPER_WHITE_BACKGROUND
#defineHAS_AXP2101
#defineHAS_M5PM1
1 selects the M5PM1 (PY32) PMIC path, PowerManagerM5PM1 (StickS3).
#definePMIC_I2C_ADDR
#defineM5PM1_IRQ_PIN
#defineHAS_BM8563_RTC
1 when a BM8563 I2C RTC keeps wall time; 0 keeps time on the ESP32 internal RTC.
#defineRTC_I2C_ADDR
#defineHAS_IMU
1 when the board fits an IMU: enables shake-to-lock and its sensitivity setting.
#defineIMU_TYPE_QMI8658
#defineIMU_TYPE_MPU6886
1 compiles the MPU6886 driver into the createImu probe factory (StickC Plus 1.1, Plus2).
#defineIMU_TYPE_BMI270
#defineHAS_IMU_INTERRUPT
#defineIMU_I2C_ADDR
7-bit I2C address the createImu probe factory reads; 0 = no IMU.
#defineIMU_INT1_PIN
#defineAUDIO_OUTPUT
#defineAUDIO_OUTPUT_DRIVEN
#defineAUDIO_CODEC_ES8311
#defineAUDIO_CODEC_I2C_ADDR
7-bit I2C address handed to the codec factory (0x18 for the ES8311).
#defineAUDIO_AMP_PMIC_PYG3
#defineAUDIO_AMP_AW88298
1 selects the AW88298 smart-amplifier driver at AUDIO_AMP_I2C_ADDR.
#defineAUDIO_AMP_I2C_ADDR
7-bit I2C address of the AW88298 smart amplifier (0x36 on the CoreS3 SE).
#defineAUDIO_AMP_AW9523_ADDR
Optional AW9523B I/O expander that holds the amplifier's reset, RSTN (0 = none).
#defineAUDIO_AMP_GPIO
#defineAUDIO_AMP_AXP192_GPIO2
#definePIN_AUDIO_AMP_EN
Enable GPIO of an AUDIO_AMP_GPIO amplifier; -1 = none.
#defineAUDIO_AMP_GPIO_ACTIVE_HIGH
1 when PIN_AUDIO_AMP_EN enables the amplifier on a HIGH level; 0 = active-low.
#defineAUDIO_I2S_PORT
I2S controller index of the speaker path; -1 = no I2S output.
#definePIN_AUDIO_MCLK
I2S master-clock GPIO of the speaker path; -1 = not used.
#definePIN_AUDIO_BCLK
I2S bit-clock GPIO of the speaker path; -1 = not used.
#definePIN_AUDIO_WS
I2S word-select GPIO of the speaker path; -1 = not used.
#definePIN_AUDIO_DOUT
I2S data-out GPIO of the speaker path; -1 = no I2S output (see AUDIO_HAS_I2S).
#definePIN_AUDIO_DIN
I2S data-in GPIO of the speaker path; -1 = not used.
#definePIN_AUDIO_BUZZER
GPIO that drives an AUDIO_OUTPUT_BUZZER part with LEDC PWM; -1 = none.
#defineAUDIO_HAS_I2S
#defineHAS_PSRAM
#defineKLEIDOS_SCREENSHOT_FRAMEBUFFER
#defineKLEIDOS_LIVE_FRAMEBUFFER
#defineKLEIDOS_SHADOW_FRAMEBUFFER
#defineKLEIDOS_RENDER_STATS
#defineHAS_GPIO_POWER
#defineHAS_THIRD_BUTTON
#defineHAS_KEYBOARD
#defineKEYBOARD_TYPE_TCA8418
1 compiles the NXP TCA8418 matrix-controller driver (Cardputer ADV, 0x34).
#defineKEYBOARD_TYPE_LILYGO
1 compiles the LilyGo ESP32-C3 I2C keyboard-slave driver (T-Deck, 0x55).
#defineHAS_KEYBOARD_BACKLIGHT
#defineHAS_TRACKBALL
1 when the board has a trackball (T-Deck).
#defineTRACKBALL_TYPE_QUADRATURE
#defineHAS_TOUCH
1 when the board has a touchscreen (T-Deck GT911, Core2 v1.3 and CoreS3 SE FT6x36).
#defineTOUCH_TYPE_FT6X36
#defineTOUCH_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.
#defineTOUCH_I2C_ADDR
7-bit I2C address of the FT6x36 touch controller (0x38); 0 = none.
#defineHAS_SDCARD
1 when the board has an SD card slot; compiles the SD card support.
#defineSDCARD_SPI_HOST
#defineSDCARD_FREQ_KHZ
SD SPI clock in kHz, measured per board rather than assumed.
#defineNO_OTA
#definePIN_BTN_A
#definePIN_BTN_B
#definePIN_BTN_C
Face button C GPIO; -1 when absent or a touch zone (HAS_THIRD_BUTTON says which).
#definePIN_BOARD_POWERON
#definePIN_USER_BUTTON
Top user-button GPIO (CoreInk, where it is the lock button); -1 = none.
#definePIN_STATUS_LED
Status LED GPIO, driven to its off level by the power manager; -1 = no LED.
#defineSTATUS_LED_ACTIVE_LOW
1 when the status LED lights on a LOW level, so its off level is HIGH.
#definePIN_POWER_BUTTON
GPIO of a power button wired to the ESP32 (Plus2 G35, CoreInk G27); -1 = none.
#definePOWER_BUTTON_ACTIVE_LOW
1 when PIN_POWER_BUTTON reads LOW while pressed.
#definePIN_BAT_ADC
ADC GPIO that senses the battery through a divider; -1 = none.
#defineBAT_ADC_RATIO_NUMERATOR
#defineBAT_ADC_RATIO_DENOMINATOR
Denominator of the battery divider ratio (see BAT_ADC_RATIO_NUMERATOR).
#definePIN_I2C_SDA
SDA GPIO of the internal I2C bus; -1 = not configured.
#definePIN_I2C_SCL
SCL GPIO of the internal I2C bus; -1 = not configured.
#definePIN_I2C_PORT
I2C controller port of the internal bus; -1 = not configured.
#definePIN_KEYBOARD_INT
#defineKEYBOARD_I2C_ADDR
#definePIN_TFT_BL
Older name for the backlight GPIO; PIN_DISPLAY_BL falls back to it.
#definePIN_RADIO_CS
#definePIN_RADIO_RST
LoRa radio reset GPIO, held LOW to keep the unused radio in reset; -1 = none.
#definePIN_RADIO_BUSY
LoRa radio BUSY GPIO, parked as a pulled-down input; -1 = none.
#definePIN_RADIO_DIO1
LoRa radio DIO1 GPIO, parked as a pulled-down input; -1 = none.
#definePIN_GPS_TX
TX GPIO of the GPS UART; -1 = no GPS wiring.
#definePIN_GPS_RX
RX GPIO of the GPS UART; -1 = no GPS wiring.
#defineHAS_GPS
#definePIN_ES7210_MCLK
ES7210 MCLK GPIO, parked as a pulled-down input; -1 = none.
#definePIN_ES7210_SCK
ES7210 SCK GPIO, parked as a pulled-down input; -1 = none.
#definePIN_ES7210_LRCK
ES7210 LRCK GPIO, parked as a pulled-down input; -1 = none.
#definePIN_ES7210_DIN
ES7210 data GPIO, parked as a pulled-down input; -1 = none.
#defineES7210_I2C_ADDR
I2C address of the unused ES7210 (7-bit); -1 when absent or not on the bus.
#definePIN_IR_TX
IR emitter GPIO, driven and held at its inactive level; -1 = no IR LED.
#defineIR_TX_ACTIVE_HIGH
1 when the IR LED lights on a HIGH level, so its idle level is LOW.
#definePIN_RGB_LED_DATA
#defineGPS_BAUD_RATE
#definePIN_SDCARD_CS
SD card chip-select GPIO; -1 = no SD card.
#definePIN_SPI_SCK
SCK GPIO of the SD card's SPI bus; -1 = none.
#definePIN_SPI_MISO
MISO GPIO of the SD card's SPI bus; -1 = none.
#definePIN_SPI_MOSI
MOSI GPIO of the SD card's SPI bus; -1 = none.
#definePIN_TFT_CS
Older name for the display chip-select GPIO; PIN_DISPLAY_CS falls back to it.
#definePIN_TFT_DC
Older name for the display data/command GPIO; PIN_DISPLAY_DC falls back to it.
#definePIN_DISPLAY_SCK
Display SPI clock GPIO; -1 = no SPI panel.
#definePIN_DISPLAY_MISO
Display SPI MISO GPIO; -1 = no separate MISO line.
#definePIN_DISPLAY_MOSI
Display SPI MOSI GPIO; -1 = no SPI panel.
#definePIN_DISPLAY_CS
Display chip-select GPIO; the fallback is PIN_TFT_CS.
#definePIN_DISPLAY_DC
Display data/command GPIO; the fallback is PIN_TFT_DC.
#definePIN_DISPLAY_RST
#definePIN_DISPLAY_BUSY
E-paper BUSY GPIO (CoreInk); -1 = none.
#definePIN_DISPLAY_BL
#definePIN_TOUCH_INT
Touch-controller interrupt GPIO (GT911 on the T-Deck); -1 = none.
#definePIN_TRACKBALL_UP
Trackball up GPIO; -1 = no trackball.
#definePIN_TRACKBALL_DOWN
Trackball down GPIO; -1 = no trackball.
#definePIN_TRACKBALL_LEFT
Trackball left GPIO; -1 = no trackball.
#definePIN_TRACKBALL_RIGHT
Trackball right GPIO; -1 = no trackball.
#definePIN_TRACKBALL_CLICK
Trackball center-press GPIO (the BOOT pin on the T-Deck); -1 = no trackball.
#definePOWER_DEEP_SLEEP_UA
Production-sleep draw measured at the cell, uA; 0 = never measured.
#defineHAS_NARROW_VAULT_MENU
1 when VAULT_MENU_VIEW is VAULT_MENU_VIEW_NARROW (NarrowVaultView), else 0.
#defineHAS_WIDE_VAULT_MENU
1 when VAULT_MENU_VIEW is VAULT_MENU_VIEW_WIDE (WideVaultView), else 0.

Enumerations

enum class kleidos::device::AudioOutput : uint8_t { kleidos::device::AudioOutput::None , kleidos::device::AudioOutput::Buzzer , kleidos::device::AudioOutput::Speaker }
The audio output a board can carry, named by the part (AUDIO_OUTPUT in variant.h). More about kleidos::device::AudioOutput
enum class kleidos::device::SleepMode : uint8_t { kleidos::device::SleepMode::None , kleidos::device::SleepMode::PmicOff , kleidos::device::SleepMode::HoldRelease , kleidos::device::SleepMode::EspDeep }

Variables

constexpr const char *kleidos::device::kName
Full human-readable board name.
constexpr const char *kleidos::device::kShortName
Short model code / marketing name.
constexpr uint8_tkleidos::device::kId
Numeric variant id.
constexpr int16_tkleidos::device::kScreenW
Active display width in pixels.
constexpr int16_tkleidos::device::kScreenH
Active display height in pixels.
constexpr int16_tkleidos::device::kScreenCx
Center X in pixels.
constexpr int16_tkleidos::device::kScreenCy
Center Y in pixels.
constexpr uint8_tkleidos::device::kScreenRotation
Logical rotation in quarter turns (0..3).
constexpr int16_tkleidos::device::kDisplayDiagonalMmX10
Physical panel diagonal in 0.1 mm units (PPI-aware sizing).
constexpr int16_tkleidos::device::kDisplayViewDistanceMmX10
Viewing distance in 0.1 mm (0 = band reference).
constexpr int16_tkleidos::device::kDisplayPanelW
Memory columns shown, at MADCTL 0.
constexpr int16_tkleidos::device::kDisplayPanelH
Memory rows shown, at MADCTL 0.
constexpr int16_tkleidos::device::kDisplayOffsetX
First memory column shown, at MADCTL 0.
constexpr int16_tkleidos::device::kDisplayOffsetY
First memory row shown, at MADCTL 0.
constexpr uint8_tkleidos::device::kDisplayOffsetRotation
Panel rotation relative to active area.
constexpr boolkleidos::device::kDisplayInvert
Invert panel colors.
constexpr boolkleidos::device::kDisplayReadable
Panel supports GRAM read-back.
constexpr boolkleidos::device::kDisplayColorOrderBgr
True if panel uses BGR color order.
constexpr boolkleidos::device::kDisplaySpi3Wire
True if SPI bus is shared 3-wire (no MISO).
constexpr uint8_tkleidos::device::kDisplaySpiMode
SPI mode (0..3).
constexpr uint8_tkleidos::device::kDisplaySpiHost
SPI host index.
constexpr boolkleidos::device::kDisplayBusShared
True if display bus is shared with SD.
constexpr boolkleidos::device::kDisplayBacklightPwm
True if backlight uses LEDC PWM.
constexpr uint8_tkleidos::device::kDisplayBacklightPwmChannel
LEDC channel for the backlight.
constexpr uint8_tkleidos::device::kDisplayBacklightPwmTimer
LEDC timer index.
constexpr uint32_tkleidos::device::kDisplayBacklightPwmHz
LEDC frequency in Hz.
constexpr uint8_tkleidos::device::kDisplayBacklightPwmBits
LEDC resolution in bits.
constexpr uint8_tkleidos::device::kDisplayBacklightPwmOffset
LEDC duty offset.
constexpr uint16_tkleidos::device::kDisplayBacklightMinMv
Backlight rail min voltage (mV).
constexpr uint16_tkleidos::device::kDisplayBacklightMaxMv
Backlight rail max voltage (mV).
constexpr boolkleidos::device::kPmicBacklightAxp192
True if AXP192 controls the backlight rail.
constexpr boolkleidos::device::kPmicBacklightAxp2101
True if AXP2101 controls the backlight rail.
constexpr boolkleidos::device::kPmicBlAxp192RailDc3
True if AXP192 backlight uses DC3.
constexpr boolkleidos::device::kPmicBlAxp192LogicLdo3
True if AXP192 logic is on LDO3.
constexpr boolkleidos::device::kPmicBlAxp192ResetGpio4
True if AXP192 reset is on GPIO4.
constexpr boolkleidos::device::kPmicBlAxp2101PanelRails
True if AXP2101 writes the board's LDO rails.
constexpr boolkleidos::device::kPmicAxp192UnusedExten
EXTEN 5 V boost unused.
constexpr boolkleidos::device::kPmicAxp192UnusedDcdc2
DC-DC2 rail unused.
constexpr boolkleidos::device::kPmicAxp192UnusedDcdc3
DC-DC3 rail unused.
constexpr boolkleidos::device::kPmicAxp192UnusedLdo3
LDO3 load unused.
constexpr boolkleidos::device::kPmicAxp192UnusedGpio0
GPIO0 / LDOio0 load unused.
constexpr boolkleidos::device::kPmicAxp192UnusedGpio1
constexpr boolkleidos::device::kAudioAmpAxp192Gpio2
True if the speaker amplifier's shutdown pin is the AXP192's GPIO2, held low until a tone.
constexpr uint8_tkleidos::device::kDisplayResetAw9523Addr
AW9523B I2C address (0 if absent).
constexpr boolkleidos::device::kDisplayResetAw9523
True if LCD reset is behind AW9523B.
constexpr uint32_tkleidos::device::kDisplayFreqWriteHz
SPI write clock in Hz.
constexpr uint32_tkleidos::device::kDisplayFreqReadHz
SPI read clock in Hz.
constexpr boolkleidos::device::kDisplaySt7789
True if the panel is ST7789.
constexpr boolkleidos::device::kDisplayIli9342
True if the panel is ILI9342.
constexpr boolkleidos::device::kDisplayGdew0154M09
True if the panel is GDEW0154M09.
constexpr boolkleidos::device::kDisplayGdew0154D67
True if the panel is GDEW0154D67.
constexpr boolkleidos::device::kDisplayMonochrome
True if the panel is monochrome.
constexpr boolkleidos::device::kDisplayPaperWhiteBackground
True if e-paper background is paper-white.
constexpr boolkleidos::device::kDisplayIsEpaper
constexpr AudioOutputkleidos::device::kAudioOutput
The audio output this board carries, whether or not the firmware drives it.
constexpr boolkleidos::device::kAudioOutputDriven
constexpr boolkleidos::device::kAudioCodecEs8311
True if the audio codec is ES8311.
constexpr uint8_tkleidos::device::kAudioCodecI2cAddr
Audio codec I2C address.
constexpr intkleidos::device::kAudioI2sPort
constexpr boolkleidos::device::kAudioHasI2s
True if the board has an I2S transmit path (port and data-out pin), with or without a codec.
constexpr boolkleidos::device::kHasPsram
True if PSRAM is present and enabled.
constexpr boolkleidos::device::kHasImu
True if the board has an IMU.
constexpr boolkleidos::device::kImuQmi8658
True if the IMU is QMI8658.
constexpr boolkleidos::device::kImuMpu6886
True if the IMU is MPU6886.
constexpr boolkleidos::device::kImuBmi270
True if the IMU is BMI270.
constexpr boolkleidos::device::kHasImuInterrupt
True if the IMU exposes an interrupt line.
constexpr boolkleidos::device::kHasRtc
True if the board has a BM8563 RTC.
constexpr boolkleidos::device::kHasAxp2101
True if the board has an AXP2101 PMIC.
constexpr boolkleidos::device::kHasM5pm1
True if the board has an M5PM1 expansion PMIC.
constexpr boolkleidos::device::kHasKeyboard
constexpr boolkleidos::device::kHasKeyboardBacklight
True if the keyboard has a dimmable backlight (feature gate for its level setting).
constexpr boolkleidos::device::kHasTrackball
True if the board has a trackball.
constexpr boolkleidos::device::kHasTouch
True if the board has a touch controller.
constexpr boolkleidos::device::kTouchFt6x36
True if the touch controller is FT6X36.
constexpr boolkleidos::device::kTouchZoneStripBelowDisplay
constexpr int16_tkleidos::device::kTouchZoneBandPx
Height in px of the on-screen A/B/C band, on a board whose touch surface covers the display only.
constexpr int16_tkleidos::device::kTouchZoneTopY
First raw panel row that belongs to the A/B/C zones, not the pointer.
constexpr boolkleidos::device::kHasSdCard
True if the board has an SD card slot.
constexpr uint8_tkleidos::device::kSdCardSpiHost
SPI host index for the SD card.
constexpr uint32_tkleidos::device::kSdCardFreqKHz
SD SPI clock (kHz), measured per board.
constexpr intkleidos::device::kPinBtnA
Face button A GPIO.
constexpr intkleidos::device::kPinBtnB
Face button B GPIO.
constexpr intkleidos::device::kPinBtnC
constexpr boolkleidos::device::kHasThirdButton
constexpr intkleidos::device::kPinBoardPower
Board power-on GPIO.
constexpr intkleidos::device::kPinUserButton
Generic user button GPIO.
constexpr intkleidos::device::kPinStatusLed
Status LED GPIO.
constexpr boolkleidos::device::kStatusLedActiveLow
True if status LED is active-low.
constexpr intkleidos::device::kPinPowerButton
Power button GPIO.
constexpr boolkleidos::device::kPowerButtonActiveLow
True if power button is active-low.
constexpr intkleidos::device::kPinBatteryAdc
Battery sense ADC GPIO.
constexpr intkleidos::device::kBatteryAdcRatioNumerator
Battery divider numerator.
constexpr intkleidos::device::kBatteryAdcRatioDenominator
Battery divider denominator.
constexpr intkleidos::device::kPinI2cSda
Internal I2C SDA GPIO.
constexpr intkleidos::device::kPinI2cScl
Internal I2C SCL GPIO.
constexpr intkleidos::device::kPinI2cPort
Internal I2C port index.
constexpr intkleidos::device::kPinKeyboardInt
Keyboard interrupt GPIO.
constexpr intkleidos::device::kPinTftBacklight
TFT backlight GPIO (alias).
constexpr intkleidos::device::kPinTftCs
TFT chip-select GPIO (alias).
constexpr intkleidos::device::kPinTftDc
TFT data/command GPIO (alias).
constexpr intkleidos::device::kPinDisplaySck
Display SPI SCK GPIO.
constexpr intkleidos::device::kPinDisplayMiso
Display SPI MISO GPIO.
constexpr intkleidos::device::kPinDisplayMosi
Display SPI MOSI GPIO.
constexpr intkleidos::device::kPinDisplayCs
Display SPI CS GPIO.
constexpr intkleidos::device::kPinDisplayDc
Display SPI D/C GPIO.
constexpr intkleidos::device::kPinDisplayRst
Display reset GPIO.
constexpr intkleidos::device::kPinDisplayBusy
E-paper busy GPIO.
constexpr intkleidos::device::kPinDisplayBacklight
Display backlight GPIO.
constexpr intkleidos::device::kPinRadioCs
Radio chip-select GPIO.
constexpr intkleidos::device::kPinRadioRst
Radio reset GPIO.
constexpr intkleidos::device::kPinRadioBusy
Radio busy GPIO.
constexpr intkleidos::device::kPinRadioDio1
Radio IRQ DIO1 GPIO.
constexpr intkleidos::device::kPinGpsTx
GPS TX GPIO.
constexpr intkleidos::device::kPinGpsRx
GPS RX GPIO.
constexpr boolkleidos::device::kHasGps
GPS receiver present (feature gate).
constexpr uint32_tkleidos::device::kGpsBaudRate
GPS UART baud (per-variant; hardware-set).
constexpr intkleidos::device::kPinAudioMclk
Audio master clock GPIO.
constexpr intkleidos::device::kPinAudioBclk
audio bit clock GPIO.
constexpr intkleidos::device::kPinAudioWs
audio word-select GPIO.
constexpr intkleidos::device::kPinAudioDout
audio data-out GPIO.
constexpr intkleidos::device::kPinAudioDin
audio data-in GPIO.
constexpr intkleidos::device::kPinAudioBuzzer
GPIO of a buzzer (-1 if none).
constexpr intkleidos::device::kPinEs7210Mclk
Unused ES7210 mic MCLK GPIO (-1 if none).
constexpr intkleidos::device::kPinEs7210Sck
Unused ES7210 mic SCK GPIO (-1 if none).
constexpr intkleidos::device::kPinEs7210Lrck
Unused ES7210 mic LRCK GPIO (-1 if none).
constexpr intkleidos::device::kPinEs7210Din
Unused ES7210 mic DIN GPIO (-1 if none).
constexpr intkleidos::device::kEs7210I2cAddr
Unused ES7210 I2C address (-1 if absent).
constexpr intkleidos::device::kPinIrTx
Unused IR TX LED GPIO (-1 if none).
constexpr boolkleidos::device::kIrTxActiveHigh
IR LED drive polarity (true=active-high).
constexpr intkleidos::device::kPinRgbLedData
Unused RGB LED data GPIO (-1 if none).
constexpr intkleidos::device::kPinSdCardCs
SD card chip-select GPIO.
constexpr intkleidos::device::kPinSpiSck
Shared SPI SCK GPIO.
constexpr intkleidos::device::kPinSpiMiso
Shared SPI MISO GPIO.
constexpr intkleidos::device::kPinSpiMosi
Shared SPI MOSI GPIO.
constexpr intkleidos::device::kPinM5pm1Irq
M5PM1 IRQ GPIO.
constexpr intkleidos::device::kPinImuInt1
IMU interrupt-1 GPIO.
constexpr intkleidos::device::kPinTouchInt
Touch interrupt GPIO.
constexpr intkleidos::device::kPinTrackballUp
Trackball up GPIO.
constexpr intkleidos::device::kPinTrackballDown
Trackball down GPIO.
constexpr intkleidos::device::kPinTrackballLeft
Trackball left GPIO.
constexpr intkleidos::device::kPinTrackballRight
Trackball right GPIO.
constexpr intkleidos::device::kPinTrackballClick
Trackball click GPIO.
constexpr SleepModekleidos::device::kSleepMode
How this board sleeps, as its variant.h declares (BOARD_SLEEP_MODE).
constexpr autokleidos::device::kSleepWakePins
GPIOs that wake the board from ESP deep sleep, every one active-low.
constexpr boolkleidos::device::kSleepWakesOnResetOnly
True where only the reset button or a power cycle ends the deep sleep.
constexpr autokleidos::device::kIdleWakePins
Active-low GPIOs that end the main loop's idle wait, every one an input.
constexpr uint32_tkleidos::device::kIdleWaitMaxMs
constexpr boolkleidos::device::kIdleWaitLit
constexpr uint8_tkleidos::device::kPmicI2cAddr
PMIC I2C address.
constexpr uint8_tkleidos::device::kRtcI2cAddr
RTC I2C address.
constexpr uint8_tkleidos::device::kImuI2cAddr
IMU I2C address.
constexpr uint8_tkleidos::device::kEyboardI2cAddr
Keyboard I2C address.
constexpr uint8_tkleidos::device::kTouchI2cAddr
Touch controller I2C address.

Back to the top

Macro Definition Documentation

AUDIO_AMP_AXP192_GPIO2 #

#define 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_I2C_ADDR.

AUDIO_AMP_GPIO #

#define AUDIO_AMP_GPIO

Analog amplifier (NS4150B, NS4168) gated by a plain GPIO enable line. 1 selects the GpioAmp driver on PIN_AUDIO_AMP_EN.

AUDIO_AMP_PMIC_PYG3 #

#define 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 #

#define AUDIO_CODEC_ES8311

1 compiles the ES8311 I2C codec driver, programmed at AUDIO_CODEC_I2C_ADDR once I2S runs; 0 = no I2C codec.

AUDIO_HAS_I2S #

#define 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 #

#define AUDIO_OUTPUT

The fitted audio output, AUDIO_OUTPUT_NONE / _BUZZER / _SPEAKER. Every board declares it, and a check of the build holds it there; host builds have none.

AUDIO_OUTPUT_DRIVEN #

#define 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 #

#define 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 #

#define BOARD_SLEEP_MODE

How this board sleeps, one of the BOARD_SLEEP_MODE_* ids. Every variant.h declares it; only a build with no variant.h (no board) gets NONE here.

BOARD_SLEEP_MODE_NONE #

#define BOARD_SLEEP_MODE_NONE

Host / native builds: no board, no sleep.

DEVICE_ID #

#define 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 #

#define 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 #

#define 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 #

#define DISPLAY_DIAGONAL_MM_X10

Physical panel diagonal in 0.1 mm units. Unset on unregistered/host builds; default to a 1.14" panel so PPI-aware sizing has a sane (Compact) fallback.

DISPLAY_FREQ_READ_HZ #

#define 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 #

#define DISPLAY_HEIGHT

Logical display height in pixels, after DISPLAY_ROTATION is applied. The fallback is the 240 px height of the portrait StickC panel.

DISPLAY_OFFSET_ROTATION #

#define 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 #

#define 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/gram_window.h).

DISPLAY_OFFSET_Y #

#define 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/gram_window.h).

DISPLAY_PANEL_HEIGHT #

#define DISPLAY_PANEL_HEIGHT

Controller memory rows the panel shows, in the controller's own orientation (MADCTL 0, before any rotation); the fallback is DISPLAY_HEIGHT.

DISPLAY_PANEL_WIDTH #

#define DISPLAY_PANEL_WIDTH

Controller memory columns the panel shows, in the controller's own orientation (MADCTL 0, before any rotation); the fallback is DISPLAY_WIDTH.

DISPLAY_PAPER_WHITE_BACKGROUND #

#define DISPLAY_PAPER_WHITE_BACKGROUND

Paper-white background flag, declared 1 by the CoreInk e-paper; re-exported as device::kDisplayPaperWhiteBackground.

DISPLAY_RESET_AW9523 #

#define DISPLAY_RESET_AW9523

1 when the LCD reset line sits on an AW9523B I/O expander (CoreS3 SE): the expander at AW9523_I2C_ADDR is started and pulses the reset before panel init.

DISPLAY_SPI_3WIRE #

#define 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 #

#define DISPLAY_SPI_HOST

SPI host of the display bus: 2 = SPI2, 3 = SPI3. Any other value (the fallback 0) lets display_catalog.cpp pick the host from the target and the pins.

DISPLAY_TYPE_GDEW0154D67 #

#define DISPLAY_TYPE_GDEW0154D67

1 for a GoodDisplay GDEW0154D67 (SSD1681) 200x200 e-paper (CoreInk): compiles the e-paper HAL with that controller.

DISPLAY_TYPE_GDEW0154M09 #

#define DISPLAY_TYPE_GDEW0154M09

1 for a GoodDisplay GDEW0154M09 (JD79653A) 200x200 e-paper: compiles the e-paper HAL with that controller.

DISPLAY_TYPE_ILI9342 #

#define 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 #

#define 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 #

#define 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::metrics()).

DISPLAY_WIDTH #

#define DISPLAY_WIDTH

Logical display width in pixels, after DISPLAY_ROTATION is applied. The fallback is the 135 px width of the portrait StickC panel.

GPS_BAUD_RATE #

#define 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 #

#define 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 #

#define HAS_GPIO_POWER

1 when peripheral power is a GPIO-switched rail rather than a PMIC (T-Deck, PIN_BOARD_POWERON): compiles the GPIO peripheral-power path.

HAS_GPS #

#define 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 #

#define 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::kHasImuInterrupt.

HAS_KEYBOARD #

#define HAS_KEYBOARD

1 when the board has a physical QWERTY keyboard: selects the passphrase auth UI, and must agree with VAULT_MENU_VIEW_KEYBOARD (checked at the end of this file).

HAS_KEYBOARD_BACKLIGHT #

#define 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 #

#define HAS_PSRAM

1 when the board fits external PSRAM; the admin hardware inventory reports it beside the runtime probe.

HAS_THIRD_BUTTON #

#define 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/board/board_def.h. The fallback 0 means the board has no third button.

IDLE_WAIT_LIT #

#define 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 #

#define 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 #

#define 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 #

#define 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::kPinImuInt1.

IMU_TYPE_BMI270 #

#define 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 #

#define 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 #

#define 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 #

#define KLEIDOS_LIVE_FRAMEBUFFER

Live shadow framebuffer for the color SPI panels: drawing primitives compose into a RAM buffer inside a frameBegin/frameCommit bracket, then the whole frame is blitted to the panel in one streamed transfer. This makes the clear+redraw happen invisibly in RAM (no visible fillScreen-to-black flicker) and lets the UI render intermediate animation frames off-screen. Color SPI TFT only: e-paper has its own batch/partial-refresh path. Defaults to 1 on the ST7789 and ILI9342 panels, 0 otherwise.

KLEIDOS_RENDER_STATS #

#define 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_SERIAL_BUTTONS and KLEIDOS_LIVE_FRAMEBUFFER are set.

KLEIDOS_SCREENSHOT_FRAMEBUFFER #

#define 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_SERIAL_BUTTONS), 0 otherwise.

KLEIDOS_SHADOW_FRAMEBUFFER #

#define 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 #

#define M5PM1_IRQ_PIN

ESP32 GPIO wired to the M5PM1 IRQ output (GPIO13 on the StickS3); -1 = none. Re-exported as device::kPinM5pm1Irq.

NO_OTA #

#define 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 #

#define 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 #

#define 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 #

#define 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 #

#define 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 #

#define 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 #

#define 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_WAKE_PINS lists the keys that wake each board.

PIN_RADIO_CS #

#define 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 #

#define 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 #

#define 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 #

#define PMIC_I2C_ADDR

7-bit I2C address of the PMIC (0x34 AXP192 / AXP2101, 0x6E M5PM1); 0 disables PMIC I2C transactions.

RTC_I2C_ADDR #

#define 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 #

#define 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 #

#define SLEEP_WAKE_PINS

GPIOs that wake an ESP deep sleep, comma-separated and all active-low: the only wake source of BOARD_SLEEP_MODE_ESP_DEEP, the on-USB one of _HOLD_RELEASE, and the fallback of _PMIC_OFF when the PMIC does not switch off. Every variant.h declares it, empty when no ESP GPIO can wake the board; a build with no variant.h has no board and an empty list.

SLEEP_WAKE_RESET_ONLY #

#define 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_WAKE_PINS is empty on purpose (the T-Deck); 0 otherwise. Only BOARD_SLEEP_MODE_ESP_DEEP may declare 1, and an empty wake list under that mode is a build error without it. Code reads device::kSleepWakesOnResetOnly.

TOUCH_TYPE_FT6X36 #

#define 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 #

#define 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 #

#define TRACKBALL_TYPE_QUADRATURE

Trackball family flag. Mirrors the KEYBOARD_TYPE_* / IMU_TYPE_* gates: it selects which concrete driver the createTrackball flag-gated factory (drivers/trackball/trackball_factory) is allowed to instantiate. A trackball is a passive GPIO device with no bus to probe, so a board with no trackball family compiled in resolves to the shared NullTrackball without touching a pin. 1 on the T-Deck: a four-direction plus click GPIO trackball.

VAULT_MENU_VIEW #

#define VAULT_MENU_VIEW

The vault-menu layout this build compiles, one of the VAULT_MENU_VIEW_* ids. Every variant.h declares it; only a build with no variant.h gets NONE here. No board attached: the host unit tests and the QA host firmware compile no vault-menu view at all.

Back to the top

Enumeration Type Documentation

AudioOutput #

enum class kleidos::device::AudioOutput : uint8_t

The audio output a board can carry, named by the part (AUDIO_OUTPUT in variant.h).

Enumerator
None 

Nothing fitted that makes a sound.

Buzzer 

A buzzer on a GPIO: PWM tones only.

Speaker 

A speaker behind an I2S amplifier or codec.

SleepMode #

enum class kleidos::device::SleepMode : uint8_t

How the board sleeps once locked and idle, the typed form of the BOARD_SLEEP_MODE_* ids; each board's is on The boards.

Enumerator
None 

No board (host / native builds).

PmicOff 

The PMIC switches the board off.

HoldRelease 

Dropping the power hold cuts the supply.

EspDeep 

ESP deep sleep, woken by a wake pin.

Back to the top

Variable Documentation

kAudioI2sPort #

int kleidos::device::kAudioI2sPort
constexpr

I2S peripheral index for the codec.

kAudioOutputDriven #

bool kleidos::device::kAudioOutputDriven
constexpr

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_OUTPUT_DRIVEN 0 to leave its part alone (none today).

kDisplayIsEpaper #

bool kleidos::device::kDisplayIsEpaper
constexpr

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 #

bool kleidos::device::kHasKeyboard
constexpr

True if the board has a physical keyboard.

kHasThirdButton #

bool kleidos::device::kHasThirdButton
constexpr

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 #

bool kleidos::device::kIdleWaitLit
constexpr

Whether the main loop may wait out an idle stretch with the panel lit, or only in the dark (IDLE_WAIT_LIT).

kIdleWaitMaxMs #

uint32_t kleidos::device::kIdleWaitMaxMs
constexpr

Longest idle wait the board's polled inputs allow, ms; 0 sets no bound (IDLE_WAIT_MAX_MS).

kIdleWakePins #

auto kleidos::device::kIdleWakePins
constexpr

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 #

int kleidos::device::kPinBtnC
constexpr

Face button C GPIO (or -1 if absent).

kPmicAxp192UnusedGpio1 #

bool kleidos::device::kPmicAxp192UnusedGpio1
constexpr

GPIO1 load unused.

kSleepWakePins #

auto kleidos::device::kSleepWakePins
constexpr

GPIOs that wake the board from ESP deep sleep, every one active-low.

The only wake source of SleepMode::EspDeep, the on-USB one of SleepMode::HoldRelease (where the power hold cannot cut the supply), and the fallback of SleepMode::PmicOff when the PMIC does not switch off. Empty where no ESP GPIO can wake the board, and under SleepMode::EspDeep only where kSleepWakesOnResetOnly says so. A check of the build holds each one to an RTC GPIO of the board's SoC.

kSleepWakesOnResetOnly #

bool kleidos::device::kSleepWakesOnResetOnly
constexpr

True where only the reset button or a power cycle ends the deep sleep.

Declared on purpose (SLEEP_WAKE_RESET_ONLY 1) by a board whose SleepMode::EspDeep 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 #

int16_t kleidos::device::kTouchZoneBandPx
constexpr

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::kTapRowMmX10, pinned by a static_assert in ui/popup/popup_state.cpp) — the smallest a touch control may be, which leaves the pointer the most glass. Where the strip is below the display this band does not exist: the zones live off the screen and the pointer has all of it.

kTouchZoneStripBelowDisplay #

bool kleidos::device::kTouchZoneStripBelowDisplay
constexpr

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_ZONE_STRIP_BELOW_DISPLAY.

kTouchZoneTopY #

int16_t kleidos::device::kTouchZoneTopY
constexpr

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.

Back to the top