| components | |
| bsp | |
| adc.c | |
| adc.h | Volume potentiometer: ADC1 sampling and mapping to PCM5242 digital volume |
| board_pins.h | GPIO pin map for the TB2026-YDS board |
| bsp.h | Board support package umbrella header: pulls in every bus driver |
| i2c_bus.c | |
| i2c_bus.h | Shared I2C master bus (expander, DAC control, fuel gauge) |
| i2s_bus.c | |
| i2s_bus.h | I2S0 master TX stream to the PCM5242 DAC |
| spi_bus.c | |
| spi_bus.h | SPI buses: display on SPI2 (HSPI), SD card on SPI3 (VSPI) |
| drivers | |
| audio_dac | |
| audio_dac.c | |
| audio_dac.h | PCM5242 DAC control over I2C (volume, mute) |
| display_oled | |
| display_oled.c | |
| display_oled.h | SSD1333 OLED driver (NHD-1.91-176176UBC3, 176x176, 4-wire SPI) |
| fuel_gauge | |
| fuel_gauge.c | |
| fuel_gauge.h | MAX17260 ModelGauge m5 EZ 1-cell fuel gauge (I2C 0x36) |
| gpio_expander | |
| gpio_expander.c | |
| gpio_expander.h | PI4IOE5V9554A 8-bit I2C GPIO expander (PCA9554A-compatible) at 0x38 |
| sdcard | |
| sdcard.c | |
| sdcard.h | MicroSD card over SPI3 (VSPI), mounted as a FATFS volume at "/sdcard" |
| screens | |
| audio | |
| now_playing.c | |
| now_playing.h | |
| output_select.c | Output-selection popup: route audio to the Jack or a Bluetooth speaker |
| output_select.h | Output-selection popup (reached from Now Playing, UP) |
| playlist_browser.c | |
| playlist_browser.h | |
| settings | |
| audio_settings.c | Audio settings: output routing (top) and an L/R balance slider (bottom) |
| audio_settings.h | Audio settings sub-screen (reached from Settings): output routing and L/R balance slider |
| bluetooth_settings.c | Bluetooth settings: one combined screen listing paired and nearby devices |
| bluetooth_settings.h | Bluetooth settings sub-screen (reached from Settings) |
| power_settings.c | Power sub-menu on a single screen: sleep delay, auto power-off, and power off |
| power_settings.h | Power sub-menu (reached from Settings): sleep delay, auto power-off, power off |
| screen_settings.c | Screen (display) settings: brightness slider + auto-sleep delay |
| screen_settings.h | Screen (display) settings sub-screen (reached from Settings): brightness slider and auto-sleep delay |
| settings_screen.c | Settings menu (top-level): a list over the four settings sub-screens |
| settings_screen.h | The Settings menu (top-level), reached from the home screen |
| stats | |
| battery_test.c | Battery autonomy test screen: pick a workload, check readiness, review the last run |
| battery_test.h | Battery autonomy test screen (reached with DOWN from the Stats > Battery page) |
| fuel_gauge_debug.c | Fuel-gauge debug screen: config-vs-expected check, learned state, EZ reload |
| fuel_gauge_debug.h | Hidden fuel-gauge debug screen (reached with UP from the Stats > Battery page) |
| stats_screen.c | Statistics / diagnostics menu: a top-level list over five live detail pages |
| stats_screen.h | The Statistics menu (top-level), reached from the home screen: five live diagnostics pages (battery, storage, inputs, peripherals, system) |
| storage | |
| storage_screen.c | |
| storage_screen.h | File browser over the SD card (top-level), reached from the home screen: navigate folders, play or delete a track |
| menu_item.h | One entry in a menu_screen: a label plus a navigation target or action |
| menu_screen.c | |
| menu_screen.h | Generic vertical-list menu screen (a concrete screen_t) |
| root_menu.c | |
| root_menu.h | The home screen shown after boot: a vertical list of icon+label entries |
| services | |
| audio | |
| audio_sink.h | |
| decoder.c | Decoder facade: owns the FILE*, auto-detects the format, delegates to a backend |
| decoder.h | Audio file decoder: turns an MP3 or WAV file into interleaved PCM frames |
| decoder_backend.h | Internal contract between the decoder facade (decoder.c) and a format backend |
| decoder_mp3.c | MP3 backend: libhelix (fixed-point) decoding one frame per decoder_read() |
| decoder_wav.c | WAV backend: PCM RIFF/WAVE, 16-bit or 24-bit, mono or stereo, up to 192 kHz |
| mp3_frame.c | MPEG Layer III header + Xing/Info/VBRI parsing (see mp3_frame.h) |
| mp3_frame.h | Internal MPEG-1/2 Layer III header + VBR-tag (Xing/Info/VBRI) parsing |
| pipeline.c | Audio pipeline task: producer->consumer loop from a PCM source to a selectable sink (wired DAC or Bluetooth) |
| pipeline.h | Audio pipeline: the real-time task that pulls PCM from a source and pushes it to an Audio sink interface |
| player.c | Playback transport state machine over the playlist and pipeline |
| player.h | Playback transport: the orchestrator that turns the playlist into sound |
| playlist.c | |
| playlist.h | Play order and navigation over the Storage service index: what to play next |
| sink_bluetooth.c | Bluetooth A2DP audio sink: bridge the push pipeline to the pull A2DP source |
| sink_bluetooth.h | Bluetooth A2DP audio sink: stream PCM to a connected speaker |
| sink_i2s_dac.c | |
| sink_i2s_dac.h | Wired output path control: PCM5242 analog mute (XSMT) and MAX97220 amp shutdown |
| track_meta.c | Tags + format reader (see track_meta.h): MP3 ID3v2/ID3v1, WAV header, no playback |
| track_meta.h | Read a track's tags and format without playing it |
| volume.c | Volume service: pot -> active output (DAC byte or Bluetooth AVRCP), deadband write |
| volume.h | Volume service: maps the pot to whichever output is active (DAC, Bluetooth, or none) |
| autonomy | |
| autonomy.c | Autonomy test service: run lifecycle, discharge-curve logging, SD export |
| autonomy.h | Battery autonomy self-test: run a workload on battery until shutdown, log a curve |
| bluetooth | |
| bluetooth.c | Classic Bluetooth A2DP source: stack bring-up, name-based discovery and connection |
| bluetooth.h | Classic Bluetooth A2DP source: bring up the stack and connect to a speaker |
| diag | |
| diag.c | Diagnostics report: stack occupancy of the registered tasks, FreeRTOS task list and run-time stats, internal/PSRAM heap usage |
| diag.h | Runtime diagnostics: FreeRTOS stack occupancy, run-time stats, heap usage |
| input | |
| input.c | Input service: ISR-notified task reads buttons over I2C/GPIO, debounces, queues events |
| input.h | Input service: the six buttons -> one semantic ui_event_t in a single queue |
| input_logic.c | Pure debounce + press-edge detection + button->ui_event mapping (no hardware) |
| input_logic.h | Pure button-state -> UI-event logic: debounce + press-edge detection + mapping |
| maintenance | |
| maintenance.c | Maintenance task: periodically runs background chores (volume/player polls, power_tick, autonomy_tick, SD hot-plug watch, idle auto power-off, diag) |
| maintenance.h | Maintenance service: low-priority background task for periodic chores |
| power | |
| power.c | Power service implementation: fuel-gauge snapshot, charge/level policy, on/off |
| power.h | Power service: battery state, charge detection, and board power on/off |
| settings | |
| settings.c | |
| settings.h | Settings service: persistent user-preference store backed by NVS |
| storage | |
| storage.c | |
| storage.h | Track enumeration over the microSD card: the index of playable files |
| ui | |
| event.h | Input event vocabulary shared by screens and the navigator |
| gfx.c | |
| gfx.h | Framebuffer drawing primitives for the 176x176 RGB565 OLED |
| icons.c | |
| icons.h | |
| navigator.c | |
| navigator.h | Screen-stack router: push/pop screens and dispatch input to the top one |
| screen.h | Screen interface contract: the vtable every screen implements |
| status_bar.c | |
| status_bar.h | Global status overlay drawn on top of every screen |
| main | |
| app.c | |
| app.h | Application entry points: board bring-up and UI hand-off |
| app_main.c | |