Architecture

Architecture

One source tree builds the Kleidos firmware for nine boards across two chip families. What makes that possible is not cleverness; it is a shape that is checked on every commit: twenty-six modules in one order, each of which may use the modules below it and nothing above, and the check fails when that stops being true.

Like the security page, this one describes a repository you cannot open yet. The check runs on every commit; letting you run it yourself is a step on the roadmap.

Updated

The order nothing may climb

The firmware is twenty-six modules in one order, each above the modules it uses. A module includes its own headers and those of the modules below it; an include pointing upward fails the check, in the commit hook and again in continuous integration.

The five main parts

  1. Assembly and control

    four modules · The files that name every part of one board and drive it. They sit at the top because they reach down to everything; nothing reaches them.

  2. Screens and surfaces

    four modules · Everything a person looks at or types into, on the device or in a browser.

  3. Device services

    four modules · What the device does once it is open: type, connect, erase, measure itself.

  4. Data and secrets

    six modules · What the device holds and what locks it. Below every screen and every radio: the vault does not depend on the parts that draw it or send it.

  5. Hardware and foundation

    eight modules · The chips, and the single door to the chip's own services. Nine different boards meet the rest of the firmware here.

includes → Board Configurations QA Host Firmware Entry Point & State Dispatch Serial Debug Console Application States Wi-Fi Admin Panel User Interface Settings Model Change of Owner & Resets Network Services BLE HID Keyboard Diagnostics Vault Storage Security Brand Lookup & Logo Atlas One-Time Codes Internationalization Cryptography Hardware Abstraction Layer Device Drivers Clock & Time Zone Platform Abstraction Update Policy Build Configuration JSON Reader, Writer and Binder Utilities
Boards Board Configurations Board Configurations itself includes Diagnostics, one line includes Hardware Abstraction Layer, 49 lines includes Device Drivers, 2 lines includes Platform Abstraction, 24 lines includes Build Configuration, 15 lines
QA host QA Host Firmware QA Host Firmware itself includes Platform Abstraction, 17 lines includes Utilities, 2 lines
Entry point Entry Point & State Dispatch Entry Point & State Dispatch itself includes Serial Debug Console, 4 lines includes Application States, 22 lines includes Wi-Fi Admin Panel, 2 lines includes User Interface, 12 lines includes Change of Owner & Resets, one line includes Network Services, one line includes BLE HID Keyboard, 3 lines includes Diagnostics, 7 lines includes Vault Storage, 4 lines includes Security, one line includes One-Time Codes, one line includes Internationalization, 2 lines includes Cryptography, one line includes Hardware Abstraction Layer, 20 lines includes Clock & Time Zone, 2 lines includes Platform Abstraction, 23 lines includes Update Policy, one line includes Build Configuration, 4 lines includes Utilities, 2 lines
Debug console Serial Debug Console Serial Debug Console itself includes Application States, 50 lines includes Wi-Fi Admin Panel, 11 lines includes User Interface, 18 lines includes Settings Model, one line includes Change of Owner & Resets, 4 lines includes Network Services, 3 lines includes BLE HID Keyboard, 12 lines includes Diagnostics, 9 lines includes Vault Storage, 30 lines includes Security, 3 lines includes One-Time Codes, 10 lines includes Internationalization, 2 lines includes Cryptography, 19 lines includes Hardware Abstraction Layer, 59 lines includes Device Drivers, 17 lines includes Clock & Time Zone, 10 lines includes Platform Abstraction, 173 lines includes Build Configuration, 26 lines includes Utilities, 43 lines
States Application States Application States itself includes Wi-Fi Admin Panel, 9 lines includes User Interface, 709 lines includes Settings Model, 12 lines includes Change of Owner & Resets, 5 lines includes Network Services, 13 lines includes BLE HID Keyboard, 26 lines includes Diagnostics, 3 lines includes Vault Storage, 58 lines includes Security, 30 lines includes One-Time Codes, 51 lines includes Internationalization, 70 lines includes Cryptography, 16 lines includes Hardware Abstraction Layer, 176 lines includes Device Drivers, 2 lines includes Clock & Time Zone, 22 lines includes Platform Abstraction, 143 lines includes Build Configuration, 92 lines includes Utilities, 52 lines
Admin panel Wi-Fi Admin Panel Wi-Fi Admin Panel itself includes Settings Model, 6 lines includes Change of Owner & Resets, 3 lines includes Network Services, 3 lines includes BLE HID Keyboard, 11 lines includes Diagnostics, 2 lines includes Vault Storage, 71 lines includes Security, 23 lines includes One-Time Codes, 13 lines includes Internationalization, one line includes Cryptography, 23 lines includes Hardware Abstraction Layer, 9 lines includes Device Drivers, 4 lines includes Clock & Time Zone, 12 lines includes Platform Abstraction, 93 lines includes Build Configuration, 11 lines includes JSON Reader, Writer and Binder, 42 lines includes Utilities, 50 lines
UI User Interface User Interface itself includes Settings Model, 3 lines includes BLE HID Keyboard, 2 lines includes Vault Storage, 2 lines includes Security, 9 lines includes Brand Lookup & Logo Atlas, 3 lines includes One-Time Codes, one line includes Internationalization, 24 lines includes Cryptography, 3 lines includes Hardware Abstraction Layer, 107 lines includes Clock & Time Zone, 8 lines includes Platform Abstraction, 52 lines includes Build Configuration, 22 lines includes Utilities, 21 lines
Settings model Settings Model Settings Model itself includes Internationalization, 2 lines includes Build Configuration, one line
Wipe Change of Owner & Resets Change of Owner & Resets itself includes Network Services, 2 lines includes BLE HID Keyboard, one line includes Vault Storage, 8 lines includes Security, 4 lines includes Platform Abstraction, 7 lines
Network Network Services Network Services itself includes BLE HID Keyboard, one line includes Vault Storage, 2 lines includes Security, one line includes Cryptography, one line includes Clock & Time Zone, 4 lines includes Platform Abstraction, 11 lines includes Utilities, 2 lines
BLE HID BLE HID Keyboard BLE HID Keyboard itself includes Clock & Time Zone, 2 lines includes Platform Abstraction, 35 lines includes Utilities, 7 lines
Diagnostics Diagnostics Diagnostics itself includes Hardware Abstraction Layer, one line includes Device Drivers, one line includes Clock & Time Zone, 2 lines includes Platform Abstraction, 21 lines includes Utilities, 3 lines
Vault Vault Storage Vault Storage itself includes Security, 6 lines includes Brand Lookup & Logo Atlas, 2 lines includes One-Time Codes, 8 lines includes Cryptography, 33 lines includes Hardware Abstraction Layer, 3 lines includes Clock & Time Zone, one line includes Platform Abstraction, 102 lines includes Build Configuration, 17 lines includes Utilities, 34 lines
Security Security Security itself includes Cryptography, 2 lines includes Clock & Time Zone, 2 lines includes Platform Abstraction, 5 lines includes Build Configuration, one line
Brands Brand Lookup & Logo Atlas Brand Lookup & Logo Atlas itself includes Build Configuration, 2 lines includes Utilities, one line
2FA codes One-Time Codes One-Time Codes itself includes Clock & Time Zone, 4 lines includes Platform Abstraction, 6 lines includes Build Configuration, one line includes Utilities, 2 lines
Languages Internationalization Internationalization itself includes Platform Abstraction, one line
Crypto Cryptography Cryptography itself includes Platform Abstraction, 26 lines includes Utilities, 2 lines
HAL Hardware Abstraction Layer Hardware Abstraction Layer itself includes Device Drivers, 70 lines includes Clock & Time Zone, 8 lines includes Platform Abstraction, 125 lines includes Build Configuration, 49 lines includes Utilities, 11 lines
Drivers Device Drivers Device Drivers itself includes Clock & Time Zone, 4 lines includes Platform Abstraction, 64 lines includes Build Configuration, 14 lines includes Utilities, 2 lines
Clock Clock & Time Zone Clock & Time Zone itself includes Platform Abstraction, 7 lines includes Build Configuration, one line includes Utilities, one line
Platform Platform Abstraction Platform Abstraction itself includes Update Policy, one line includes Build Configuration, one line includes Utilities, 10 lines
Updates Update Policy Update Policy itself
Build config Build Configuration Build Configuration itself
JSON JSON Reader, Writer and Binder JSON Reader, Writer and Binder itself
Utilities Utilities Utilities itself
Read a row across: the module it names includes the modules its dots stand under, and a bigger dot is more include lines. All 152 dependencies between modules lie right of the diagonal, each one pointing at a module further down the order. The shaded triangle left of the diagonal is empty: a dot there would be an include that climbs, and the check refuses one.

The remedy for an upward include is never an exception. It is to move the header down, or to invert the call through an interface the lower module declares, which is how the admin panel reaches the running application without knowing anything of it but that interface. There is a mechanism for pinning an exception between modules, one include at a time. It is empty, and the point of it is that it is empty: no two modules in the firmware depend on each other.

Includes are spelled from the root of the source tree, so a relative path that climbs out of its own directory fails the same check. Inside a module the check goes further: its components keep an order of their own, and a cycle between headers is refused. The explorer in the next section is drawn from the same include lines the check enforces; the site keeps a copy of them, and the day that copy last changed is this page's date.

Who uses what, one module at a time

Pick a module and its panel shows, above it, the modules that use it and, below it, the ones it uses, each with its number of include lines. A module's components, the groups of its reference, are one tap further in.

Find a component by feature

PIN entry
  • States PinStateHandler the PIN screen
  • Unlock entry PinEntryUI the dial that picks each digit
  • Crypto VaultCrypto the key derived from the PIN
  • Security BruteForceGuard the lockout after wrong PINs
Typing a password
  • States BleStateHandler the sending screen
  • BLE facade BleHidManager the Bluetooth keyboard
  • HID profiles HidTyper text turned into keystrokes
Encrypted backup
  • Backup SdVault the backup on the SD card
  • Crypto ExportEnvelopeWriter seals the backup under its passphrase
  • Admin panel AdminPortal the same backup, in the browser
The Wi-Fi admin panel
  • States AdminStateHandler admin mode on the device
  • Admin panel AdminPortal the panel itself
  • Wi-Fi & HTTP AccessPointSession the device's own access point
2FA codes
  • Home TotpScreenController the codes screen
  • 2FA codes TotpGenerator the code itself (RFC 6238)
  • Repositories TotpRepository the stored secret
Firmware update
  • Admin panel AdminPortal the upload, in the browser
  • Storage AppUpdateSession writes the new firmware into the other slot
  • Updates its names are functions keeps it or goes back to the previous one, at boot
The wipe after ten wrong PINs
  • Security BruteForceGuard counts the wrong PINs
  • Wipe ChangeOfOwnerSteps erases the device for a new owner
All 26 modules
  1. Assembly and control
    1. 1 Board Configurations Boards
    2. 2 QA Host Firmware QA host
    3. 3 Entry Point & State Dispatch Entry point
    4. 4 Serial Debug Console Debug console
  2. Screens and surfaces
    1. 5 Application States States
    2. 6 Wi-Fi Admin Panel Admin panel
    3. 7 User Interface UI
    4. 8 Settings Model Settings model
  3. Device services
    1. 9 Change of Owner & Resets Wipe
    2. 10 Network Services Network
    3. 11 BLE HID Keyboard BLE HID
    4. 12 Diagnostics Diagnostics
  4. Data and secrets
    1. 13 Vault Storage Vault
    2. 14 Security Security
    3. 15 Brand Lookup & Logo Atlas Brands
    4. 16 One-Time Codes 2FA codes
    5. 17 Internationalization Languages
    6. 18 Cryptography Crypto
  5. Hardware and foundation
    1. 19 Hardware Abstraction Layer HAL
    2. 20 Device Drivers Drivers
    3. 21 Clock & Time Zone Clock
    4. 22 Platform Abstraction Platform
    5. 23 Update Policy Updates
    6. 24 Build Configuration Build config
    7. 25 JSON Reader, Writer and Binder JSON
    8. 26 Utilities Utilities

Board Configurations

16 files · 2 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Used by 0

No module above it uses it.

Board Configurations

One source for each board, which creates its parts and registers the record of them.

Its components

More about Board Configurations
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
no
Reached through
PowerManagerCardputerAdv , PowerManagerCoreInk , PowerManagerTDeck , PanelSeed , SeedSpec

QA Host Firmware

4 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Used by 0

No module above it uses it.

QA Host Firmware

The firmware of a test host: a board that plays the computer, over Bluetooth or on the admin panel's Wi-Fi.

More about QA Host Firmware
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
not every build: the device's application leaves it out
Tested on a computer
no

Entry Point & State Dispatch

3 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Used by 0

No module above it uses it.

Entry Point & State Dispatch

The start of the firmware: the boot, in order, and the loop that runs the active state.

More about Entry Point & State Dispatch
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
no

Serial Debug Console

40 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Used by 1 these use Serial Debug Console

Serial Debug Console

The serial console of a debug build, which drives a board from a cable. No other image holds it.

More about Serial Debug Console
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
not every build: the device's application leaves it out
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
SerialDebugButtonEvent , Args , BusCounts , BusWindow , CredFieldParse , DebugToken

Application States

168 files · 7 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Application States

The states of the application, what moves it from one to the next, and the handler that runs each.

Its components

More about Application States
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
AppContext , HoldGauge , AppStateHandler , IdleTimers , VaultTabStrip , ActionList

Wi-Fi Admin Panel

79 files · 3 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Wi-Fi Admin Panel

The web pages the board serves to one browser over its own Wi-Fi: to edit the vault, back it up, change settings and install an update.

Its components

More about Wi-Fi Admin Panel
Runs on
httpd (core 0) , kleidos-dns (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
AdminPortal , CustomBody , HistoryBody , ImportBody , ImportItemBody , ImportPass

User Interface

197 files · 11 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

User Interface

Everything the screen shows: drawing, components, the unlock entry (PIN or passphrase), popups and notices, brand logos and the on-screen keyboard.

Its components

More about User Interface
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
LayoutContext , Rect , SafeInsets , RasterCanvas , Canvas , ActionBarProps

Settings Model

3 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Settings Model

The options a device has, once for every surface that shows them: their groups, their values and the words for each.

More about Settings Model
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
DependencyReader , LabelTiers , SettingsCapabilities , SettingsGroupEntry , SettingsOption , ValueBacking

Change of Owner & Resets

9 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Change of Owner & Resets

What a factory reset, a vault wipe and a settings reset erase, one sequence for every way of asking for each.

More about Change of Owner & Resets
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
VaultOnlyResult , PrefKey , ChangeOfOwnerErased , ChangeOfOwnerSteps , FactoryResetFinishSteps , OwnerLinksErased

Network Services

10 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Network Services

The time from the network, the Wi-Fi session that fetches it, the admin panel's network name, and the request for the admin panel after a restart.

More about Network Services
Runs on
ntpsync (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
Status , JoinAttempt , JoinScanHit , WifiStaSessionGuard

BLE HID Keyboard

53 files · 7 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

BLE HID Keyboard

The board as a Bluetooth keyboard: advertising, pairing, the bonded hosts, and typing.

Its components

More about BLE HID Keyboard
Runs on
ble_stack (core 0) , name_store (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
BondInfo , Facade , LinkInfo , PeerInfo , LayoutEntry , NimBleHostAdapter

Diagnostics

17 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Diagnostics

What a board reports of itself: the log's queue, memory and tasks, the time spent drawing, and an estimate of what it draws.

More about Diagnostics
Runs on
telem (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
BudgetLine , IntervalFigures , Snapshot , StateFigure , StateRoles , Config

Vault Storage

75 files · 5 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Vault Storage

The encrypted vault: how logins, one-time-code secrets and saved networks are stored, listed, changed, backed up and re-keyed.

Its components

More about Vault Storage
Runs on
kleidos-vault (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
VaultIndexBatch , VaultStore , Credential , CredentialDetail , CredentialEntry , CredentialExtras

Security

7 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Security

The lockout after wrong secrets, which lasts through a sleep or a cut in power, the log of security events, and the rule for a new secret.

More about Security
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
PinRange , AuditEntry , AuditLog , BruteForceGuard

Brand Lookup & Logo Atlas

2 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Brand Lookup & Logo Atlas

From the address or the name in a login to the service's logo.

More about Brand Lookup & Logo Atlas
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
BrandEntry

One-Time Codes

10 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

One-Time Codes

Time-based one-time codes (RFC 6238): making one from the secret in the vault, and the gate that refuses when the clock cannot be trusted.

More about One-Time Codes
Runs on
kleidos-totp (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
CodeSeed , Verdict , TotpGenerator , Request , CodeClock

Internationalization

4 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Internationalization

The interface's text by name, in English, Spanish, French, German and Italian.

More about Internationalization
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer

Uses 1 Internationalization uses these

Cryptography

17 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Cryptography

From a PIN or passphrase to the keys that seal the vault, the secret bound to the chip, the seal of a backup and the password generator.

More about Cryptography
Runs on
admincrypto (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
AesCbcDecryptStream , AesCbcEncryptStream , HmacSha256Stream , VaultAesContext , VaultCrypto , ByteSpan

Hardware Abstraction Layer

119 files · 10 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Hardware Abstraction Layer

What the application calls instead of a chip: display, input, power and battery, motion, sound, SD card, clock and GPS.

Its components

More about Hardware Abstraction Layer
Runs on
kleidos-sd-settle (core 0) , speaker (core 0)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
PanelIdentity , PanelMemoryCell , PanelMemoryInfo , ShadowFramebufferInfo , SpiBusStatus , TextBox

Device Drivers

148 files · 11 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Device Drivers

One driver for each chip: panels, power chips, motion sensors, clock, touch, keyboards, trackball, audio and GPS.

Its components

More about Device Drivers
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
ChipRegmap , EnumEntry , RegDesc , RegField , I2cDevice , Pins

Clock & Time Zone

14 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Clock & Time Zone

The wall clock and how far it is trusted, what set it last, and the time zones with their daylight-saving rules.

More about Clock & Time Zone
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
RtcAlarm , RtcDate , RtcTime , DstRule , LocalDateTime , TimeZone

Platform Abstraction

115 files · 11 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Platform Abstraction

The facades over ESP-IDF and FreeRTOS that the firmware calls.

Its components

More about Platform Abstraction
Runs on
loopTask (core 1)
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
SilenceGuard , Deadline , Config , NvsStats , NvsStore , ScopedTimeout

Update Policy

2 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Update Policy

What a boot decides after an update: to keep the new firmware, to refuse it, or to say that the board went back to the previous one.

More about Update Policy
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer

Uses 0

It includes no other module.

Build Configuration

2 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Build Configuration

What the board being built has, as constants.

More about Build Configuration
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
no

Uses 0

It includes no other module.

JSON Reader, Writer and Binder

9 files · one component · Its page in the reference

To use is to include: a number counts the include lines between the two.

Used by 1 these use JSON Reader, Writer and Binder

JSON Reader, Writer and Binder

JSON read in pieces, written to a sink and bound to a record by a table, with no allocation.

More about JSON Reader, Writer and Binder
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
Writer , Binder , BindResult , BindStream , Bound , Entry

Uses 0

It includes no other module.

Utilities

10 files · 3 components · Its page in the reference

To use is to include: a number counts the include lines between the two.

Utilities

Text, lists and queues that never use the heap, a checksum, and a wipe the compiler cannot drop.

Its components

More about Utilities
Runs on
No task of its own: its code runs on the tasks that call it.
Built into
every build
Tested on a computer
yes: it has unit tests that run on a computer
Reached through
InplaceString , InplaceVector , InplaceFunction< R(Args...), Capacity > , InplaceQueue

Uses 0

It includes no other module.

in Board Configurations

Board Configurations

10 files · Its page in the reference

Used by 0

No other component uses it.

Board Configurations

One source for each board, which creates its parts and registers the record of them.

Its types

  • PanelSeed 0 files outside include it
  • SeedSpec 0 files outside include it

in Board Configurations

Board-Specific Support

6 files · Its page in the reference

Used by 1

Board-Specific Support

The power managers that only one board uses: the CoreInk's, the LILYGO T-Deck's and the M5Cardputer ADV's.

Its types

  • PowerManagerCardputerAdv one file outside includes it
  • PowerManagerCoreInk one file outside includes it
  • PowerManagerTDeck one file outside includes it

in Application States

Application States

12 files · Its page in the reference

Application States

The states of the application, what moves it from one to the next, and the handler that runs each.

Its types

  • BleStateHandler 3 files outside include it
  • HomeStateHandler 3 files outside include it
  • AdminStateHandler 2 files outside include it
  • HwTestStateHandler 2 files outside include it
  • PinStateHandler 2 files outside include it
  • ComponentGalleryStateHandler one file outside includes it

in Application States

Home Screen

44 files · Its page in the reference

Home Screen

What the home screen shows and does besides settings: the lists, a record's detail, the one-time codes, the choice of a host, the SD card's flows and the edits.

Its types

  • KeyboardVaultView 2 files outside include it
  • WideVaultView 2 files outside include it
  • CredDetailController one file outside includes it
  • CredRowCache one file outside includes it
  • HostSelectController one file outside includes it
  • NarrowVaultView one file outside includes it

and 13 more in the reference

in Application States

First-Time Setup

20 files · Its page in the reference

First-Time Setup

The first use of a board: its keys, the language, a rehearsal of each control, the unlock secret, and the pairing of a first computer.

Its types

  • OnboardingStateHandler 4 files outside include it
  • KeyboardOnboardingStateHandler one file outside includes it
  • EpaperControlLayout 0 files outside include it
  • EpaperControlRow 0 files outside include it
  • EpaperLocator 0 files outside include it
  • OnboardingLogic 0 files outside include it

and 3 more in the reference

in Application States

Settings Screen & Service

53 files · Its page in the reference

Settings Screen & Service

The settings screen, its overlays and wizards, and the service that reads and applies an option.

Its types

  • SetClockBuildDate 3 files outside include it
  • SetClockController 3 files outside include it
  • PortalAppHost 2 files outside include it
  • RowContent 2 files outside include it
  • GpsSyncController one file outside includes it
  • SettingsController one file outside includes it

and 19 more in the reference

in Application States

State Context & Shared Flows

12 files · Its page in the reference

State Context & Shared Flows

What every state handler shares: the context and its sleep path, the handler's interface, and the flows that several states run.

Its types

  • AppContext 67 files outside include it
  • AppStateHandler 11 files outside include it
  • DebugDummyHost 4 files outside include it
  • PairHostPage 2 files outside include it

in Application States

Shared Screen Parts

11 files · Its page in the reference

Shared Screen Parts

The pieces several screens draw or steer by: the header, the lock screen's clock, the Bluetooth chip, the list's motion, and the navigation with two buttons or a dial.

Its types

  • HoldGauge 36 files outside include it
  • VaultTabStrip 8 files outside include it
  • DrawnBand 5 files outside include it
  • Frame 5 files outside include it
  • Regions 5 files outside include it
  • HeaderShown 4 files outside include it

and 4 more in the reference

in Application States

State Rules

16 files · Its page in the reference

State Rules

The decisions the handlers take, with no screen, no context and no device behind them, and the list of states itself.

Its types

  • IdleTimers 8 files outside include it
  • ActionList 5 files outside include it
  • IdleClock 4 files outside include it
  • PairTick 3 files outside include it
  • Inputs one file outside includes it
  • KeptRead one file outside includes it

and 2 more in the reference

in Wi-Fi Admin Panel

Display Stream

6 files · Its page in the reference

Display Stream

The video of the display that a debug build sends to the tests.

Its types

  • BandLedger one file outside includes it
  • BandRect one file outside includes it
  • QueuedSlice one file outside includes it
  • SlicePayload one file outside includes it
  • SliceWalk one file outside includes it
  • SnapshotQueue one file outside includes it

and 1 more in the reference

in Wi-Fi Admin Panel

Wi-Fi Admin Panel

56 files · Its page in the reference

Wi-Fi Admin Panel

The web pages the board serves to one browser over its own Wi-Fi: to edit the vault, back it up, change settings and install an update.

Its types

  • AdminPortal 9 files outside include it
  • AdminAppHost one file outside includes it
  • AdminHttpClient one file outside includes it
  • AdminHttpHeader one file outside includes it
  • AdminHttpRequest one file outside includes it
  • AdminHttpResponse one file outside includes it

and 17 more in the reference

in Wi-Fi Admin Panel

Admin Panel Rules

17 files · Its page in the reference

Admin Panel Rules

The decisions the admin panel's routes take, with no server behind them.

Its types

  • CustomBody 6 files outside include it
  • HistoryBody 6 files outside include it
  • ImportBody 6 files outside include it
  • ImportItemBody 6 files outside include it
  • ImportPass 6 files outside include it
  • IntegerField 6 files outside include it

and 26 more in the reference

in User Interface

Login Detail View Model

10 files · Its page in the reference

Used by 2

Login Detail View Model

What the detail of a login shows and where each key leads, the sentences about a record, and what a refused one-time code offers.

Its types

  • FixCopy 14 files outside include it
  • GateCopy 14 files outside include it
  • CredCardActions 3 files outside include it
  • CredDetailLogic 3 files outside include it
  • CredStopList 3 files outside include it
  • EpaperCardCursor 3 files outside include it

and 2 more in the reference

in User Interface

Unlock Entry

29 files · Its page in the reference

Unlock Entry

How the owner enters the secret, by board: a dialed PIN, a touch keypad or a keyboard.

Its types

  • AuthEntryUI 10 files outside include it
  • Countdown 3 files outside include it
  • LockStatus 3 files outside include it
  • PinEntryRenderProps 2 files outside include it
  • PinEntryRenderer 2 files outside include it
  • PinEntryUI 2 files outside include it

and 23 more in the reference

in User Interface

Notifications

2 files · Its page in the reference

Notifications

Notices about the battery, the link, the admin panel, the lock and an update, shown once and not again until the state really changes.

Its types

  • AdminClientState 7 files outside include it
  • AdminIdleState 7 files outside include it
  • AutoLockState 7 files outside include it
  • BatteryState 7 files outside include it
  • HostState 7 files outside include it
  • OtaAppliedState 7 files outside include it

Uses 3

and 1 in the foundation

in User Interface

Popups & Modals

17 files · Its page in the reference

Popups & Modals

Toasts, spinners, confirmations and alerts, drawn over any screen.

Its types

  • ChoiceListOptions 50 files outside include it
  • ConfirmOptions 50 files outside include it
  • DialInputs 50 files outside include it
  • ListNavEdges 50 files outside include it
  • ModalHints 50 files outside include it
  • ProgressOptions 50 files outside include it

and 16 more in the reference

in User Interface

Settings View Model

5 files · Its page in the reference

Used by 2

Settings View Model

How a setting reads on the screen: its value in words, what handles it on a keyboard panel, and the tables of device information.

Its types

  • InfoPage 3 files outside include it
  • InfoRow 3 files outside include it
  • InfoRows 3 files outside include it
  • SettingsPresenter 3 files outside include it

in User Interface

Reusable Widgets

4 files · Its page in the reference

Used by 1

Reusable Widgets

A scrolling menu that every board drives with its own inputs, and the header's chip that says the clock is not set.

Its types

  • MenuItem one file outside includes it
  • OnDeviceMenu one file outside includes it

in User Interface

Interface Components

86 files · Its page in the reference

Interface Components

Buttons, lists, dialogs, steppers, keyboards and the rest, each drawn from the values it is given.

Its types

  • ActionBarProps 59 files outside include it
  • ActionSlot 59 files outside include it
  • DrawnActionBar 59 files outside include it
  • HeaderProps 54 files outside include it
  • HeaderStatus 54 files outside include it
  • KleidosMarkPixels 54 files outside include it

and 60 more in the reference

in User Interface

Brand Logos

4 files · Its page in the reference

Brand Logos

The drawing of a service's logo, at the size a screen has for it.

Its types

  • DrawOptions 6 files outside include it
  • AtlasSource 0 files outside include it
  • CoverageOutput 0 files outside include it
  • DecodeResult 0 files outside include it
  • PixelOutput 0 files outside include it
  • ScratchBuffer 0 files outside include it

and 1 more in the reference

Uses 3

and 1 in the foundation

in User Interface

Buttons & Gestures

11 files · Its page in the reference

Buttons & Gestures

The gestures every screen and both dial styles rely on, over the input sources.

Its types

  • TouchGestureConfig 22 files outside include it
  • TouchGestureEvent 22 files outside include it
  • TouchGestureRecognizer 22 files outside include it
  • TouchSample 22 files outside include it
  • TouchListGeom 17 files outside include it
  • TouchListHit 17 files outside include it

and 10 more in the reference

Uses 5

and 1 in the foundation

in User Interface

Render Canvas

6 files · Its page in the reference

Render Canvas

The canvas over the display, the smooth shapes it draws, and the choice of how an e-paper panel refreshes.

Its types

  • RasterCanvas 68 files outside include it
  • EpaperFrameDecision 4 files outside include it
  • EpaperSettleController 4 files outside include it
  • Annulus 3 files outside include it
  • PixelRun 3 files outside include it

Uses 3

and 1 in the foundation

in User Interface

Canvas, Theme & Layout

23 files · Its page in the reference

Canvas, Theme & Layout

What every screen draws with: the canvas, the design tokens, the theme, the roles of text and the rules of layout.

Its types

  • LayoutContext 119 files outside include it
  • Rect 119 files outside include it
  • SafeInsets 119 files outside include it
  • Canvas 67 files outside include it
  • Bands 34 files outside include it
  • BudgetCap 34 files outside include it

and 20 more in the reference

Uses 4

and 3 in the foundation

in BLE HID Keyboard

BLE Facade & HID Manager

5 files · Its page in the reference

BLE Facade & HID Manager

The one entry point to Bluetooth for the screens and the admin panel, and the manager that runs the keyboard service behind it.

Its types

  • BondInfo 44 files outside include it
  • Facade 44 files outside include it
  • LinkInfo 44 files outside include it
  • PeerInfo 44 files outside include it
  • BleHidManager 2 files outside include it
  • IBleStack 0 files outside include it

in BLE HID Keyboard

Bond Storage

7 files · Its page in the reference

Bond Storage

The bonded hosts: their identity, the name the owner gave each, their order, and the removal of one.

Its types

  • NameStore 4 files outside include it
  • BondStore 3 files outside include it
  • NameStoreTask 0 files outside include it

in BLE HID Keyboard

BLE Stack Integration

13 files · Its page in the reference

BLE Stack Integration

The owner of NimBLE on core 0: the stack's task, the queue of commands to it and the bus of events from it.

Its types

  • NimBleHostAdapter 6 files outside include it
  • BleStackTask 4 files outside include it
  • BleCommandQueue 3 files outside include it
  • BleEventBus 2 files outside include it
  • HostLinkInfo one file outside includes it
  • HostTaskStack one file outside includes it

and 5 more in the reference

in BLE HID Keyboard

BLE Connection Management

3 files · Its page in the reference

Used by 2

BLE Connection Management

The state of the link as one coherent snapshot, and the parameters of a connection and of advertising.

Its types

  • ConnParamSet 2 files outside include it
  • ConnectionManager 2 files outside include it
  • Snapshot 2 files outside include it

Uses 2

and 1 in the foundation

in BLE HID Keyboard

Pairing & Numeric Comparison

8 files · Its page in the reference

Used by 4

Pairing & Numeric Comparison

Who may pair, connect and receive keystrokes, and the prompt that compares six digits on both screens.

Its types

  • Snapshot 2 files outside include it
  • ConnectKeystoreView one file outside includes it

Uses 3

and 2 in the foundation

in BLE HID Keyboard

HID Profiles & Keyboard Tables

10 files · Its page in the reference

Used by 2

HID Profiles & Keyboard Tables

From text to key presses: the typer, the codes of the keys, and the accented letters each keyboard layout can type.

Its types

  • HidProfile 4 files outside include it
  • BatteryNotifyLatch 2 files outside include it
  • HidTyper one file outside includes it
  • IHidSink one file outside includes it
  • TypingResult one file outside includes it
  • Latin1Entry 0 files outside include it

and 1 more in the reference

Uses 4

and 2 in the foundation

in BLE HID Keyboard

BLE Types

7 files · Its page in the reference

BLE Types

The values every part of Bluetooth speaks: the keyboard layouts, the commands and events, the state of a session and of the stack, and the record of a host.

Its types

  • LayoutEntry 9 files outside include it
  • NameRecord 5 files outside include it
  • BleCommand 3 files outside include it
  • BleEvent 3 files outside include it
  • WaitBudget 3 files outside include it

Uses 1

and 1 in the foundation

in Vault Storage

Backup, Import & Export

22 files · Its page in the reference

Backup, Import & Export

The sealed backup the admin panel and the SD card share, the import of other managers' CSV files, and the SD card's flows.

Its types

  • CsvImportResult 11 files outside include it
  • SdEnvelopeOpen 11 files outside include it
  • SdVault 11 files outside include it
  • BackupStats 7 files outside include it
  • CoalescingSink 7 files outside include it
  • RestoreContext 7 files outside include it

and 13 more in the reference

in Vault Storage

Vault Storage

21 files · Its page in the reference

Vault Storage

The encrypted vault: how logins, one-time-code secrets and saved networks are stored, listed, changed, backed up and re-keyed.

Its types

  • VaultIndexBatch 58 files outside include it
  • VaultStore 58 files outside include it
  • Credential 29 files outside include it
  • CredentialDetail 29 files outside include it
  • CredentialEntry 29 files outside include it
  • CredentialExtras 29 files outside include it

and 14 more in the reference

in Vault Storage

Record Repositories

10 files · Its page in the reference

Record Repositories

The store of each kind of record: logins, one-time-code secrets and saved networks, with the names of the groups and the order of the lists.

Its types

  • CredentialRecord 20 files outside include it
  • CredentialRepository 20 files outside include it
  • CredentialSlotPresence 20 files outside include it
  • TotpData 20 files outside include it
  • TotpRecord 12 files outside include it
  • TotpRepository 12 files outside include it

and 8 more in the reference

in Vault Storage

Keys, Metadata & Rotation

8 files · Its page in the reference

Keys, Metadata & Rotation

The vault's keys, the authenticated metadata that holds them wrapped, what a typed secret becomes before it is derived, and the key rotation.

Its types

  • DerivedKeys 22 files outside include it
  • VaultKeys 22 files outside include it
  • WrapKeys 22 files outside include it
  • MetaKekHalf 18 files outside include it
  • MetaRotState 18 files outside include it
  • MetaSecretKindSource 18 files outside include it

and 10 more in the reference

in Vault Storage

Record Log & Envelopes

14 files · Its page in the reference

Record Log & Envelopes

The log the records are appended to, the binary form of a record, and the sealed envelope around it.

Its types

  • IndexEntry 21 files outside include it
  • RotationKeys 21 files outside include it
  • VaultIndex 21 files outside include it
  • EnvelopeContext 13 files outside include it
  • RecordStore 9 files outside include it
  • ByteScratch 8 files outside include it

and 10 more in the reference

in Hardware Abstraction Layer

Board Bring-up

5 files · Its page in the reference

Board Bring-up

The start of a board's hardware and its update on each tick.

Its names are functions and constants.

in Hardware Abstraction Layer

Clock Chip Back End

one file · Its page in the reference

Used by 0

No other component uses it.

Clock Chip Back End

The wall clock kept by a BM8563 chip, on the boards that have one.

Its names are functions and constants.

in Hardware Abstraction Layer

Power, Battery & Parking

19 files · Its page in the reference

Power, Battery & Parking

How each board sleeps, why it woke, what its battery says, and how hardware that nothing is using is switched off.

Its types

  • PowerManager 19 files outside include it
  • Outcome 5 files outside include it
  • Reading 5 files outside include it
  • PowerManagerAXP2101 4 files outside include it
  • PowerManagerAdcBattery one file outside includes it
  • PowerManagerM5PM1 one file outside includes it

and 11 more in the reference

in Hardware Abstraction Layer

Input Sources & the Wake Rule

36 files · Its page in the reference

Input Sources & the Wake Rule

Buttons, keyboards, trackball and touch behind four interfaces, and the rule that the first input on a dark panel only wakes it.

Its types

  • TouchInput 43 files outside include it
  • TouchPoint 43 files outside include it
  • KeyboardInput 34 files outside include it
  • Plan 34 files outside include it
  • Slot 34 files outside include it
  • State 34 files outside include it

and 34 more in the reference

in Hardware Abstraction Layer

Display

28 files · Its page in the reference

Display

The panel: its surface, its text, its frames and its light.

Its types

  • PanelIdentity 89 files outside include it
  • PanelMemoryCell 89 files outside include it
  • PanelMemoryInfo 89 files outside include it
  • ShadowFramebufferInfo 89 files outside include it
  • SpiBusStatus 89 files outside include it
  • TextBox 89 files outside include it

and 19 more in the reference

in Hardware Abstraction Layer

Board Description

4 files · Its page in the reference

Board Description

The record of a board's hardware, where it is registered, and how often a chip that has to be polled is read.

Its types

  • TouchReading 45 files outside include it
  • BoardDef 5 files outside include it
  • PollPeriod 5 files outside include it

Uses 3

and 3 in the foundation

in Hardware Abstraction Layer

Sound: Catalog, Renderers & Speaker

14 files · Its page in the reference

Sound: Catalog, Renderers & Speaker

The sounds as data, the two renderers that turn one into what a board plays, and the task that plays it.

Its types

  • AudioFeedback 11 files outside include it
  • StreamStats 4 files outside include it
  • Digest 0 files outside include it
  • Entry 0 files outside include it
  • Note 0 files outside include it
  • PwmSequencer 0 files outside include it

and 8 more in the reference

Uses 9

and 6 in the foundation

in Hardware Abstraction Layer

Motion & Shake-to-Lock

5 files · Its page in the reference

Motion & Shake-to-Lock

The shake that locks the device, and the motion sensor behind it.

Its types

  • ShakeSamples 3 files outside include it
  • ShakeDetector 2 files outside include it
  • MotionLine one file outside includes it

Uses 4

and 3 in the foundation

in Hardware Abstraction Layer

SD Card

4 files · Its page in the reference

SD Card

The SD card: mounting it for as long as an action lasts, formatting it, and settling it at boot, on the boards that have a slot.

Its types

  • SdCard 20 files outside include it
  • MountScope 0 files outside include it

Uses 5

and 5 in the foundation

in Hardware Abstraction Layer

GPS Time Sync

3 files · Its page in the reference

GPS Time Sync

The time from a GPS receiver: one sync when the owner asks for it, and the receiver at rest otherwise.

Its types

  • GpsDiag 9 files outside include it
  • ParkReport 9 files outside include it
  • Session 9 files outside include it
  • SyncLogic 0 files outside include it

in Device Drivers

Audio Drivers

19 files · Its page in the reference

Audio Drivers

The ES8311 codec, the ES7210 microphone converter, the AW88298 amplifier, and amplifiers switched by a power chip or a pin.

Its types

  • Es8311 2 files outside include it
  • CodecFormat one file outside includes it
  • IAudioAmp one file outside includes it
  • IAudioCodec one file outside includes it
  • Aw88298 0 files outside include it
  • Axp192Amp 0 files outside include it

and 2 more in the reference

Uses 6

and 3 in the foundation

in Device Drivers

Display Panel Drivers

21 files · Its page in the reference

Display Panel Drivers

The controllers of the panels: ST7789 and ILI9342 for color, SSD1681 and JD79653A for e-paper.

Its types

  • EpaperCommand 3 files outside include it
  • FlatToneFrame 3 files outside include it
  • GrayPassPlan 3 files outside include it
  • IEpaperController 3 files outside include it
  • LogicalPixel 3 files outside include it
  • MemoryAddress 3 files outside include it

and 19 more in the reference

Uses 1

in Device Drivers

GPS Receiver Drivers

13 files · Its page in the reference

GPS Receiver Drivers

The GPS receivers the LILYGO T-Deck can carry, the probe that finds which one is fitted, and the park that keeps it asleep.

Its types

  • IGps 2 files outside include it
  • TimeParser 2 files outside include it
  • UtcFix 2 files outside include it
  • GpsCfgValue one file outside includes it
  • GpsSatInfo one file outside includes it
  • GpsStatus one file outside includes it

and 8 more in the reference

in Device Drivers

Motion Sensor Drivers

15 files · Its page in the reference

Used by 2

Motion Sensor Drivers

The BMI270 and MPU6886 motion sensors, and a stand-in for the boards with none.

Its types

  • IImu one file outside includes it
  • AnyMotionConfig 0 files outside include it
  • Bmi270 0 files outside include it
  • ConfigImage 0 files outside include it
  • ConfigurationEvidence 0 files outside include it
  • InitAddr 0 files outside include it

and 2 more in the reference

in Device Drivers

Keyboard Drivers

12 files · Its page in the reference

Keyboard Drivers

The M5Cardputer ADV's key-matrix controller and the LILYGO T-Deck's keyboard.

Its types

  • IKeyboardController 7 files outside include it
  • LilygoKeyboard 0 files outside include it
  • NullKeyboardController 0 files outside include it
  • Tca8418 0 files outside include it

Uses 5

and 3 in the foundation

in Device Drivers

Power Chip Drivers

28 files · Its page in the reference

Power Chip Drivers

The power chips: battery, power key, the supply of the parts, and switching the board off.

Its types

  • CoulombRaw 2 files outside include it
  • IPmic 2 files outside include it
  • Py32Pmic 2 files outside include it
  • Aw9523 one file outside includes it
  • Axp192 one file outside includes it
  • Axp2101 one file outside includes it

and 2 more in the reference

Uses 4

and 2 in the foundation

in Device Drivers

Clock Chip Driver

12 files · Its page in the reference

Used by 2

Clock Chip Driver

The BM8563 clock chip.

Its types

  • IRtc one file outside includes it
  • Bm8563 0 files outside include it

Uses 4

and 1 in the foundation

in Device Drivers

Touch Controller Drivers

9 files · Its page in the reference

Used by 1

Touch Controller Drivers

The FT6x36 and GT911 touch controllers.

Its types

  • Gt911 one file outside includes it
  • ITouch one file outside includes it
  • TouchContact one file outside includes it
  • Ft6x36 0 files outside include it

Uses 7

and 5 in the foundation

in Device Drivers

Register Introspection

8 files · Its page in the reference

Register Introspection

The tables of a chip's registers that the serial console prints.

Its types

  • ChipRegmap 24 files outside include it
  • EnumEntry 24 files outside include it
  • RegDesc 24 files outside include it
  • RegField 24 files outside include it
  • RegIo 3 files outside include it
  • I2cRegIo 2 files outside include it

and 1 more in the reference

Uses 4

and 3 in the foundation

in Device Drivers

I2C Bus

4 files · Its page in the reference

I2C Bus

The board's internal I2C bus, and reading and writing the registers of a chip on it.

Its types

  • I2cDevice 21 files outside include it
  • Pins 11 files outside include it
  • BusGatedProbe 2 files outside include it

Uses 3

and 3 in the foundation

in Device Drivers

Trackball Driver

7 files · Its page in the reference

Trackball Driver

The trackball: four direction lines and a click.

Its types

  • ITrackball 4 files outside include it
  • QuadratureSteps 4 files outside include it
  • NullTrackball 0 files outside include it
  • QuadratureTrackball 0 files outside include it
  • QuadratureTrackballPins 0 files outside include it

Uses 6

and 6 in the foundation

in Platform Abstraction

Main Loop & Hooks

7 files · Its page in the reference

Main Loop & Hooks

The task that runs the firmware, and the hooks through which code calls a module above it without knowing it.

Its types

  • DebugSleepKnobs 10 files outside include it
  • WaitPumpScope 10 files outside include it
  • WaitPumpStep 10 files outside include it
  • WaitPumpTally 10 files outside include it

Uses 4

and 4 in the foundation

in Platform Abstraction

Wi-Fi & HTTP Server

16 files · Its page in the reference

Wi-Fi & HTTP Server

Wi-Fi as an access point and as a station, the HTTP server, the time from the network, and addresses.

Its types

  • Server 11 files outside include it
  • ServerConfig 11 files outside include it
  • TestBackend 11 files outside include it
  • PhyCalibration 10 files outside include it
  • PhySettings 10 files outside include it
  • Protocols 10 files outside include it

and 15 more in the reference

Uses 7

and 7 in the foundation

in Platform Abstraction

Power, Sleep & System Control

18 files · Its page in the reference

Power, Sleep & System Control

Deep and light sleep and what ends them, the CPU clock, the slow clock that counts through a sleep, and the record of a crash.

Its types

  • ChipInfo 40 files outside include it
  • ClockInfo 40 files outside include it
  • FirmwareInfo 40 files outside include it
  • HeapBlock 40 files outside include it
  • HeapRegion 40 files outside include it
  • HeapStats 40 files outside include it

and 17 more in the reference

in Platform Abstraction

Storage

18 files · Its page in the reference

Storage

LittleFS, NVS, the SD card's file system, the writer of updates, and what the security fuses say.

Its types

  • NvsStats 43 files outside include it
  • NvsStore 43 files outside include it
  • BlankWalkRecord 32 files outside include it
  • LittleFsGuard 32 files outside include it
  • MapWindow 32 files outside include it
  • MappedVaultCheck 32 files outside include it

and 10 more in the reference

Uses 8

and 7 in the foundation

in Platform Abstraction

Serial Transport

3 files · Its page in the reference

Serial Transport

The serial line of a debug build, over a UART or the chip's USB.

Its types

  • DropStats 40 files outside include it
  • LineGuard 40 files outside include it
  • LineWait one file outside includes it

Uses 3

and 3 in the foundation

in Platform Abstraction

GPIO & Buses

22 files · Its page in the reference

GPIO & Buses

GPIO, I2C, SPI, UART, PWM, I2S and ADC, the USB pads, the die's temperature, and the lock of the crypto hardware.

Its types

  • Config 31 files outside include it
  • PadState 31 files outside include it
  • Counters 14 files outside include it
  • AudioHold 10 files outside include it
  • ScopedLock 10 files outside include it
  • BusConfig 5 files outside include it

and 5 more in the reference

Uses 3

and 3 in the foundation

in Platform Abstraction

RTOS Facade

17 files · Its page in the reference

RTOS Facade

Tasks and the core each runs on, queues, semaphores, critical sections, delays and the task watchdog.

Its types

  • Config 43 files outside include it
  • ScopedTimeout 43 files outside include it
  • BinarySemaphore 8 files outside include it
  • CriticalIsrLock 8 files outside include it
  • CriticalLock 8 files outside include it
  • CriticalMux 8 files outside include it

and 11 more in the reference

Uses 1

and 1 in the foundation

in Platform Abstraction

Platform Memory & Errors

8 files · Its page in the reference

Platform Memory & Errors

Large blocks of memory, the record of an allocation that failed, names of errors, and where the compiler places a function or a variable.

Its types

  • InternalArrayDeleter 25 files outside include it
  • InternalDeleter 25 files outside include it
  • LargeArrayDeleter 25 files outside include it
  • LargeDeleter 25 files outside include it
  • FallbackAttempt 3 files outside include it
  • Record 3 files outside include it

Uses 0

It includes no other component.

in Platform Abstraction

Monotonic Clock & Deadlines

2 files · Its page in the reference

Monotonic Clock & Deadlines

The time since boot, and deadlines that stay right when it wraps.

Its types

  • Deadline 177 files outside include it

Uses 0

It includes no other component.

in Platform Abstraction

Random Numbers

2 files · Its page in the reference

Random Numbers

Random bytes from the chip's hardware generator.

Its names are functions and constants.

Uses 0

It includes no other component.

in Platform Abstraction

Logging

2 files · Its page in the reference

Logging

The log: one macro for each level, dropped when it is compiled below the level of the build.

Its types

  • SilenceGuard 209 files outside include it

Uses 0

It includes no other component.

in Utilities

Fixed-Capacity Containers

4 files · Its page in the reference

Fixed-Capacity Containers

Text, lists, queues and functions that keep what they hold inside themselves and never allocate.

Its types

  • InplaceString 101 files outside include it
  • InplaceVector 11 files outside include it
  • InplaceFunction< R(Args...), Capacity > 4 files outside include it
  • InplaceQueue one file outside includes it

Uses 2

and 2 in the foundation

in Utilities

Safe Strings

2 files · Its page in the reference

Safe Strings

Copies, comparisons and searches of C text that stay inside the space they are given.

Its names are functions and constants.

Uses 0

It includes no other component.

in Utilities

Utilities

4 files · Its page in the reference

Utilities

Text, lists and queues that never use the heap, a checksum, and a wipe the compiler cannot drop.

Its names are functions and constants.

Uses 0

It includes no other component.

Two cores, and what is not allowed on each

The chip has two cores, and the division between them is a rule rather than a tendency.

The tasks Kleidos creates

Kleidos defines twelve tasks of its own, and each board builds eleven to twelve of them. Every value in a row is read from the code that creates the task.

Task Core Priority Stack Lives What it does
loopTask Main loop core 1 1 8,704 bytes from boot to sleep Brings the board up once, then runs the loop that drives the screens, the buttons and the application's states.
httpd Admin panel core 0 5 8,192 bytes for one state, session or boot Start the web server that answers the browser on the device's access point with the admin page and its API, if it is not running.
ble_stack BLE stack core 0 4 6,144 bytes from first use to sleep Owns the Bluetooth stack: runs the commands the screens queue, handles the stack's events and publishes the link's state for the screens to read.
kleidos-totp 2FA codes core 0 4 3,072 bytes from boot to sleep Computes the two-factor codes the screens show, so a code never waits behind an unlock.
kleidos-vault Vault core 0 3 10,752 to 16,492 bytes
By board
  • Cardputer: 12,200
  • Core2: 16,492
  • CoreS3 SE: 16,492
  • CoreInk: 10,752
  • Plus 1.1: 10,752
  • Plus2: 10,752
  • Plus SE: 10,752
  • StickS3: 12,200
  • T-Deck: 16,492
from boot to sleep Runs every read and write of the encrypted vault and the unlock's key derivation, one request at a time, so the screens never touch the flash.
kleidos-dns Admin panel core 0 2 4,096 bytes for one state, session or boot Answers every name a phone or computer on the device's access point looks up with the device's own address, so its browser opens the admin page.
kleidos-sd-settle SD card on Cardputer, Core2, CoreS3 SE, and T-Deck core 0 2 6,144 bytes for one state, session or boot Wakes the memory card once at boot, at the board's own clock, records whether it answered and ends. Nothing is mounted.
name_store Bonds core 0 2 3,328 bytes from first use to sleep Reads and writes the names of the paired hosts in flash, one request at a time, so those writes never race the Bluetooth controller's own.
ntpsync Network core 0 2 8,192 bytes for one state, session or boot Joins a saved Wi-Fi network, asks the time servers for the time, sets the clock, leaves the network and ends.
speaker Sound core 0 2 3,072 bytes from first use to sleep Plays the queued sounds and tones one after another, so a screen never waits for a sound to end.
admincrypto Crypto core 0 1 3,072 bytes for one state, session or boot Runs the slow key derivation of an encrypted backup made or restored from a browser, one job at a time, below everything else on its core.
telem Diagnostics core 0 1 3,072 bytes for one state, session or boot Keeps the time of a telemetry run: posts a tick at each sampling period for the main loop to read the sensors on, until the run is stopped.
Debug builds only: 11 more
Task Core Priority Stack Lives What it does
kleidos-burn1 Debug console core 1 1 2,048 bytes for one state, session or boot One burner: busy arithmetic in slices until the run's end or a stop.
kleidos-prun-heat1 Debug console core 1 1 2,048 bytes for one state, session or boot One heat task: integer arithmetic until the stop, yielding to a ready task of its priority after every stretch and blocking 1 ms every kHeatSliceMs. At each block it also ends on its own once the heat has outlived its phase or gone unchecked (pthermal::kHeatGraceMs), so a loop held by a console handler never leaves the cores spinning.
kleidos-stackprobe Debug console core 1 1 3,072 bytes for one state, session or boot Entry point of the task that overflows its own stack.
httpd Display stream core 0 2 8,192 bytes for one state, session or boot Start the HTTP server and the GET /stream endpoint.
kleidos-log Diagnostics core 0 2 1,536 bytes from boot to sleep Writes the queued log lines to the serial port, so a log call never waits for the port.
kleidos-prun-sd Debug console on Cardputer, Core2, CoreS3 SE, and T-Deck core 0 2 6,144 bytes for one state, session or boot The card worker's task: its run, then the flag the runner reads, then its end.
sharace_audio Debug console core 0 2 2,048 bytes for one state, session or boot Audio task entry: play continuous 1 kHz tones until s_sharaceStop is set.
kleidos-burn0 Debug console core 0 1 2,048 bytes for one state, session or boot One burner: busy arithmetic in slices until the run's end or a stop.
kleidos-prun-heat0 Debug console core 0 1 2,048 bytes for one state, session or boot One heat task: integer arithmetic until the stop, yielding to a ready task of its priority after every stretch and blocking 1 ms every kHeatSliceMs. At each block it also ends on its own once the heat has outlived its phase or gone unchecked (pthermal::kHeatGraceMs), so a loop held by a console handler never leaves the cores spinning.
kleidos-vidsd Debug console either core 1 4,096 bytes for one state, session or boot The take's task: take the buffers, run the take, give them back.
kleidos-vidser Debug console either core 1 4,096 bytes for one state, session or boot The take's task: take the buffers, run the take, give them back.

ESP-IDF's own tasks (the Wi-Fi driver, the TCP/IP stack, the Bluetooth controller and host, the timers) are not in the table; the web server is, because Kleidos starts it and chooses its core.

A queue or a lock that either of two tasks could reach first is built before the task that consumes it exists, or inside a call that happens once. Checking whether it is null and creating it if so is the bug that looks correct: both cores pass that check, each builds its own, and nobody ever waits on one of the two.

A drawing of one unlock to scale, core by core, waits until every board's unlock has been measured: I will not draw a time I have not read on all of them.

One tree, nine boards

A board is a configuration, not a copy of the firmware.

Each board is a handful of files: its pin map and parts list, its build settings, the partition layout it picks from a shared set, and its own numbers, among them the current it draws asleep, which the measurements page prints and which is declared only once the measurement system has read it. The firmware builds on ESP-IDF 6.0.3 with no Arduino core in it, as C++26, with every compiler warning treated as an error. A guard reads all nine boards and fails on an inconsistency between them: thirty-odd invariants, including that every build carries exactly one key-derivation work factor, and that the serial console cannot be compiled into a production image.

Every board has up to five builds: an open development one, two that never ship (a debug one, and a stress one that runs the debug build at the real key-derivation cost to time it), an open production one, and a hardened one that irreversibly burns one-time fuses on its first boot. Three boards have no hardened build, because 4 MB of flash does not hold two update slots and a signed bootloader.