|
CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
|
| components | |
| cdc_core | |
| include | |
| cdc_core | |
| AttestationKeyService.h | |
| Bytes.h | Big-endian byte-packing helpers |
| Cp437.h | Canonical CP437 <-> Unicode/UTF-8 codec |
| CpuStats.h | |
| Crypto.h | Shared AES-256-GCM helpers built on mbedTLS |
| EventBus.h | |
| FactoryReset.h | |
| feature_flags.h | |
| Hash.h | Centralized non-cryptographic hash utilities |
| IChallengeResponder.h | |
| IKeyboardProvider.h | |
| IModule.h | |
| IService.h | |
| KeyFingerprint.h | |
| ModuleBase.h | |
| ModuleRegistry.h | |
| pin_storage_c.h | |
| PinManager.h | |
| Raii.h | Shared RAII wrappers for firmware resources |
| ServiceRegistry.h | |
| SlotManager.h | |
| StringUtils.h | |
| SystemLock.h | |
| TropicSlotMap.h | |
| TropicStorage.h | |
| UsbManager.h | |
| src | |
| AttestationKeyService.cpp | |
| Cp437.cpp | Canonical CP437 <-> Unicode/UTF-8 codec implementation |
| CpuStats.cpp | |
| EventBus.cpp | |
| FactoryReset.cpp | |
| IKeyboardProvider.cpp | |
| KeyFingerprint.cpp | |
| ModuleRegistry.cpp | |
| pin_storage_c.cpp | C-shim exposing badge PIN operations to C-style modules |
| PinManager.cpp | |
| ServiceRegistry.cpp | |
| SystemLock.cpp | Implementation of the SystemLock lockdown latch |
| TropicSlotMap.cpp | |
| TropicStorage.cpp | |
| UsbManager.cpp | |
| cdc_hal | |
| include | |
| cdc_hal | |
| hw_config.h | |
| IBluetoothController.h | |
| IDisplay.h | |
| IEspHardware.h | |
| II2cBus.h | |
| IKeypad.h | |
| IPowerManager.h | |
| IRtc.h | |
| ISecureElement.h | |
| ISleepController.h | |
| ISpiBus.h | |
| IWifiController.h | |
| libtropic_port_esp32.h | |
| pairing_key_config.h | Build-time selection of the TROPIC01 SH0 pairing key and slot |
| src | |
| BleAdvParser.cpp | |
| BluetoothController.cpp | |
| BQ25895Power.cpp | |
| EpaperDisplay.cpp | |
| EspHardware.cpp | |
| I2cBus.cpp | |
| libtropic_port_esp32.cpp | |
| Rtc.cpp | |
| SecureElementStub.cpp | |
| SleepController.cpp | |
| SpiBus.cpp | |
| TCA9535Keypad.cpp | |
| Tropic01Element.cpp | TROPIC01 secure-element HAL implementation with session-managed libtropic access |
| WifiController.cpp | |
| cdc_log | |
| include | |
| cdc_log.h | CDC Log: logging over TinyUSB CDC and UART |
| src | |
| cdc_log.cpp | Logging and console I/O implementation with optional hook transports |
| cdc_os_ui | |
| include | |
| cdc_os_ui | |
| views | |
| BlePairingPromptView.h | |
| BlePairingView.h | |
| LockScreenView.h | |
| PinChangeView.h | |
| AppUi.h | |
| BackupManager.h | |
| HardwareInfo.h | |
| SettingsHandlers.h | |
| SleepManager.h | |
| SystemSettingsBackup.h | |
| WifiHandlers.h | |
| src | |
| views | |
| BlePairingPromptView.cpp | BLE pairing numeric-comparison prompt view implementation |
| BlePairingView.cpp | Discoverable/pairing-mode screen implementation |
| LockScreenView.cpp | |
| PinChangeView.cpp | |
| AppUi.cpp | Core App UI setup including lock flow, menus, and status icon updates |
| AppUiInternal.h | |
| BackupManager.cpp | Encrypted, versioned, semantic backup loader |
| BackupMenuUi.cpp | Expert-menu Backup UI: Export / Import / Delete flows |
| BluetoothMenuUi.cpp | Bluetooth UI flow for toggling BLE, status display, and device scanning |
| ExpertMenuUi.cpp | Expert UI menus including module control and TROPIC maintenance actions |
| HardwareInfo.cpp | |
| MsgTransferUi.cpp | OS UI glue for the badge-to-badge message transfer framework: consent prompt, peer picker, progress view, beacon menu (toggle, name, scan). Observes cdc_msg via EventBus + polling |
| SettingsHandlers.cpp | |
| SleepManager.cpp | |
| SystemSettingsBackup.cpp | Export/import of OS-level NVS settings for the backup container |
| WifiHandlers.cpp | |
| WifiMenuUi.cpp | Wi-Fi UI flows for scanning, setup wizard, connection, and diagnostics |
| cdc_ui | |
| include | |
| cdc_ui | |
| BackupImport.h | |
| I18n.h | Internationalization with English fallbacks in code and overlay translations loaded at runtime from a VFAT JSON file |
| IView.h | |
| PsramCjson.h | RAII scope that routes cJSON allocations to PSRAM |
| ViewStack.h | |
| src | |
| I18n.cpp | Translation lookup with English fallback in rodata and overlay translations loaded at runtime from a JSON file on the plugins FAT |
| ViewStack.cpp | View-stack implementation with recursive mutex |
| cdc_views | |
| include | |
| cdc_views | |
| fonts | |
| FreeMonoBold12pt8b.h | |
| FreeMonoBold9pt8b.h | |
| CanvasView.h | |
| ColorPickerView.h | |
| ConfirmView.h | |
| ContextMenuView.h | |
| DateInputView.h | |
| Fonts.h | |
| InfoView.h | |
| KeyCodes.h | |
| LayoutConstants.h | |
| ListView.h | |
| MessageBox.h | |
| PasswordT9View.h | |
| PinEntryView.h | |
| QRCodeView.h | |
| RenderHelpers.h | |
| SliderView.h | |
| T9InputView.h | |
| TimeInputView.h | |
| ToastView.h | |
| src | |
| CanvasView.cpp | Plugin-side custom canvas: plugin draws into the body, host owns the input state for inline widgets (slider, text-input, button) |
| ColorPickerView.cpp | RGB-triangle color picker with Bayer-4 dithered preview for 1-bit e-paper displays |
| ConfirmView.cpp | |
| ContextMenuView.cpp | |
| DateInputView.cpp | |
| Fonts.cpp | |
| InfoView.cpp | |
| ListView.cpp | |
| MessageBox.cpp | |
| PasswordT9View.cpp | |
| PinEntryView.cpp | |
| QRCodeView.cpp | |
| RenderHelpers.cpp | |
| SliderView.cpp | |
| T9InputView.cpp | |
| TimeInputView.cpp | |
| ToastView.cpp | |
| mod_2fa | |
| include | |
| mod_2fa | |
| ble_chalresp.h | |
| OathStore.h | |
| TwoFaModule.h | |
| src | |
| ble_chalresp.cpp | |
| OathStore.cpp | |
| TwoFaModule.cpp | |
| mod_ble_serial | |
| include | |
| mod_ble_serial | |
| BleSerialModule.h | |
| BleUartService.h | |
| src | |
| BleSerialModule.cpp | BLE serial module wiring NUS transport to console hooks and UI toggle |
| BleUartService.cpp | BLE Nordic UART Service implementation via platform Bluetooth abstraction |
| mod_fido2 | |
| include | |
| mod_fido2 | |
| cbor_helpers.h | |
| ctap2.h | |
| ctaphid.h | |
| fido2.h | |
| fido2_common.h | |
| fido2_storage.h | |
| Fido2Module.h | |
| Fido2Ui.h | |
| u2f.h | |
| src | |
| cbor_helpers.cpp | Minimal CBOR reader/writer helpers used by CTAP2 implementation |
| ctap2.cpp | CTAP2/FIDO2 command processing and ClientPIN implementation |
| ctaphid.cpp | CTAPHID transport layer for USB HID framed CTAP2/U2F traffic |
| fido2.cpp | FIDO2/WebAuthn runtime entry points and processing task |
| fido2_storage.cpp | FIDO2 storage layer using secure-element ECC slots, R-Memory, and NVS counters |
| Fido2Module.cpp | |
| Fido2Ui.cpp | FIDO2 UI views and user-presence approval workflow |
| u2f.cpp | Legacy U2F/CTAP1 protocol implementation for compatibility clients |
| mod_gpg | |
| include | |
| mod_gpg | |
| openpgp | |
| t1 | |
| t1_block.h | |
| t1_state.h | |
| algo_attr.h | |
| apdu.h | |
| ccid.h | |
| constants.h | |
| kdf.h | |
| openpgp.h | |
| tlv.h | |
| ble_gpg_xsig.h | |
| gpg.h | |
| GpgModule.h | |
| GpgRecvStore.h | |
| GpgStorage.h | |
| src | |
| ccid | |
| ccid_driver.cpp | |
| openpgp | |
| t1 | |
| t1_block.cpp | |
| t1_state.cpp | |
| algo_attr.cpp | |
| apdu.cpp | |
| ccid.cpp | |
| ecdh.cpp | |
| ecdh.h | |
| fingerprint.cpp | |
| fingerprint.h | |
| openpgp.cpp | |
| tlv.cpp | |
| xsig.cpp | |
| xsig.h | |
| ble_gpg_xsig.cpp | BLE Badge-to-Badge cross-sign endpoint |
| gpg.cpp | |
| GpgModule.cpp | |
| GpgRecvStore.cpp | |
| GpgStorage.cpp | |
| mod_nvsedit | |
| include | |
| mod_nvsedit | |
| NvsEditModule.h | |
| src | |
| NvsEditModule.cpp | GUI module for browsing and deleting NVS entries |
| mod_password | |
| include | |
| mod_password | |
| PasswordModule.h | |
| PasswordStore.h | |
| src | |
| PasswordModule.cpp | |
| PasswordStore.cpp | |
| mod_sao | |
| include | |
| mod_sao | |
| sao.h | |
| SaoModule.h | |
| src | |
| sao.cpp | |
| SaoModule.cpp | |
| mod_vcard | |
| include | |
| mod_vcard | |
| vcard_store.h | |
| VcardModule.h | |
| VcardWizard.h | |
| src | |
| vcard_store.cpp | |
| VcardModule.cpp | |
| VcardWizard.cpp | |
| plugin_manager | |
| include | |
| plugin_manager | |
| CapabilityChecker.h | Load-time validation of plugin capabilities + manifest sanity |
| GpioSerialCommands.h | Native serial commands for direct GPIO / ADC / I2C poking. Independent of plugins - the user controls the badge from a USB-CDC terminal. Same hard block list as the plugin GPIO API protects firmware-internal hardware |
| host_api.h | CDC Badge OS plugin host API - canonical C ABI contract |
| LockscreenRegistry.h | Internal registry of plugin lockscreen quick-actions |
| Plugin.h | Owned WAMR module instance + per-plugin state |
| plugin_lifecycle.h | Lifecycle exports a CDC Badge plugin must (and may) provide |
| PluginGpioPolicy.h | Single source of truth for plugin-accessible GPIO pins |
| PluginInfoView.h | Read-only summary of an installed plugin (manifest + size + SHA256) |
| PluginListView.h | Main-menu entry "Plugins" - lists all installed WASM plugins |
| PluginManager.h | Discovers, loads, runs and unloads WASM plugins on the badge |
| PluginManifest.h | In-memory representation of a plugin's meta.json |
| PluginSerialCommands.h | Serial console PLUGIN command bundle. Call once from main.cpp after PluginManager::init() to expose LIST/INFO/UPLOAD/DELETE/ START/STOP via USB-CDC |
| PluginStorage.h | Mounts the FAT-FS partition that holds plugin .wasm + .meta files |
| PluginUiState.h | Singleton that owns plugin-pushed UI views (lists, confirms, inputs) |
| Prerequisites.h | Walks the prerequisites list of a plugin manifest before plugin_on_enter |
| Raii.h | Thin alias layer that re-exports cdc::core RAII wrappers in the cdc::plugin_manager namespace for source-compatibility |
| SlotTable.h | Fixed-capacity, 1-based slot table for host-API resources |
| WamrImports.h | Registers the host API as WAMR native imports under module "cdc" |
| src | |
| CapabilityChecker.cpp | |
| GpioSerialCommands.cpp | Native serial mini-module for direct GPIO / ADC / I2C poking |
| HexUtil.h | Hex-digit decoding shared by the plugin_manager source files |
| host_api_ble.cpp | BLE host API for plugins: read-only state, a single reserved GATT server service (peripheral), and the central (GATT client) role |
| host_api_canvas.cpp | Extern-C adapter for the plugin canvas view |
| host_api_cmd.cpp | Plugin command channel - the plugin pulls a host-pushed command string buffered by PluginManager during a plugin_on_cmd dispatch |
| host_api_crypto.cpp | Crypto + encoding host APIs - mbedTLS wrappers + TROPIC01 TRNG |
| host_api_display.cpp | Low-level framebuffer drawing for plugins |
| host_api_event.cpp | EventBus subscribe/unsubscribe/publish for plugins |
| host_api_fs.cpp | Sandboxed file storage for plugins on the plugins FAT partition |
| host_api_gpio.cpp | GPIO / PWM / ADC / I2C / SAO host API with capability + pin-lock |
| host_api_http.cpp | HTTP client wrapper over esp_http_client |
| host_api_i18n.cpp | Manifest-driven i18n lookups for the currently active plugin |
| host_api_keypad.cpp | Direct keypad polling for plugins (thin wrapper over IKeypad) |
| host_api_lockscreen.cpp | Lockscreen quick-action registry exposed to plugins |
| host_api_log.cpp | Real implementation of host_log / host_log_hex |
| host_api_msg.cpp | Message-transfer host API for plugins: register MIME handlers, pull a received payload, and push a typed payload to a nearby badge |
| host_api_nvs.cpp | Plugin-namespaced NVS key/value storage |
| host_api_pixel_strip.cpp | Addressable pixel strip host API (WS2811/WS2812/WS2813/SK6812) |
| host_api_power.cpp | Real implementations of the power-state host API |
| host_api_se.cpp | TROPIC01 SecureElement host API with per-call slot capability checks |
| host_api_socket.cpp | Outbound TCP / UDP client sockets for plugin network protocols |
| host_api_strings.cpp | WAMR-facing wrappers around the plugin-boundary string codecs |
| host_api_sysinfo.cpp | Firmware identity / feature flags. Plugins use these to gate on the runtime they are loaded into - e.g. show a different UI for debug builds, or refuse to run on incompatible firmware revisions |
| host_api_time.cpp | Real implementations of the time-related host API functions |
| host_api_ui.cpp | Real implementations for the UI subset that plugins use most |
| host_api_ui_views.cpp | Extern-C adapter that forwards plugin UI calls to PluginUiState |
| host_api_usb.cpp | Raw USB-CDC TX for plugins (thin wrapper over usb_badge usb_cdc) |
| host_api_wifi.cpp | WiFi host API - hold-counted acquire/release |
| host_str_conv.cpp | Implementation of the plugin-boundary UTF-8 <-> CP437 helpers |
| host_str_conv.h | Internal UTF-8 <-> CP437 helpers for the plugin host API boundary |
| Plugin.cpp | |
| plugin_log_bridge.cpp | Cdc_log bridge for the plugin manager translation units that need to coexist with wasm_export.h |
| PluginInfoView.cpp | |
| PluginListView.cpp | |
| PluginManager.cpp | |
| PluginManifest.cpp | |
| PluginSerialCommands.cpp | Serial console commands for managing installed plugins: LIST, INFO, START, STOP, ENABLE, DISABLE, DELETE, UPLOAD |
| PluginStorage.cpp | |
| PluginUiState.cpp | |
| Prerequisites.cpp | |
| WamrImports.cpp | NativeSymbol table bound under WAMR module "cdc" |
| serial_cmd | |
| include | |
| serial_cmd | |
| Console.h | |
| ICommandRegistry.h | |
| SerialCmd.h | |
| SubCommand.h | |
| src | |
| CommandRegistry.cpp | |
| Console.cpp | |
| SerialCmd.cpp | |
| usb_badge | |
| include | |
| usb_badge | |
| usb_cdc.h | |
| usb_hid.h | |
| usb_cdc.cpp | |
| usb_descriptors.h | |
| usb_hid.cpp | |
| main | |
| main.cpp | |
| module_defaults.h | |
| tropic_slot_map.h |