Primary target is now the Pico W; functionality preserved on other boards.
IR TX (RP2040/PWM): rewritten to a non-blocking, real-time symbol state
machine. A hardware-PWM 56 kHz/40% carrier is gated by a one-shot k_timer
(mark/space flips in the timer ISR), so TX never busy-waits and runs
concurrently with IR RX, BLE and everything else. Queued frames (BLE "bomb")
are sent back-to-back with a 50 ms inter-frame gap. Boards whose ir-tx is a
plain GPIO keep the (blocking) software bit-bang carrier as a fallback.
IR RX: cycle timestamps captured in the ISR, converted to us off the
interrupt path in the decode work item (lower ISR jitter).
Fixes:
- Heartbeat moved off GPIO25 (CYW43 WL_CS on Pico W) to GPIO14 to avoid
corrupting WiFi/BLE.
- APP_BLE now selects BT_DEVICE_NAME_DYNAMIC (bt_set_name needs it).
Optimizations:
- RGB rewritten with integer math (no soft-float on the FPU-less M0+).
- CONFIG_SIZE_OPTIMIZATIONS; 100 us tick so OLT symbol durations schedule
exactly.
Pico W: boards/rpi_pico_rp2040_w.conf enables BLE out of the box.
Docs: resolved hardware TODOs (battery cell-count divider, PWM channel math,
heartbeat, carrier), README primary target = Pico W, inline comments.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port the MicroPython firmware to a maintainable Zephyr C application under
zephyr_app/, alongside the untouched original reference implementation.
- OLT IR protocol in pure C (olt_proto) with a host unit test
- buttons, piezo, RGB PWM, battery ADC, IR TX (software 56 kHz carrier),
IR RX (edge-capture + timeout decode), and gated BLE Nordic UART service
- uasyncio tasks mapped to Zephyr threads / workqueues / k_timer
- rpi_pico overlay (full) plus esp32 and nucleo_f401re stubs
- prj.conf / Kconfig / overlay-ble.conf build configuration
- docs/migration-notes.md: hardware inventory, module/API maps, open questions
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>