Handler Reference
Handlers are the bridge layer between platform-agnostic base interfaces and CRTP-templated device drivers. Each handler:
- Accepts
BaseXxx&references (I2C, SPI, UART, GPIO, ADC) at construction - Performs lazy initialization of the underlying driver
- Provides a thread-safe public API (most handlers use
RtosMutex) - Exposes
GetDriver()/GetSensor()for direct driver access - Optionally provides
visitDriver(fn)for mutex-protected callable dispatch - Reports errors via handler-specific return types or driver-native codes
Handler Summary
| Handler | Driver | Interface | Key Features |
|---|---|---|---|
| As5047uHandler | hf-as5047u-driver | BaseSpi | 14-bit angle, velocity, DAEC, GetDriver/visitDriver |
| Bno08xHandler | hf-bno08x-driver | BaseI2c / BaseSpi | 9-DOF IMU, type-erased IBno08xDriverOps, GetDriver/visitDriver |
| Pca9685Handler | hf-pca9685-driver | BaseI2c | 16-ch PWM, duty + phase, sleep/wake, PwmAdapter |
| Pcal95555Handler | hf-pcal95555-driver | BaseI2c | 16-pin GPIO expander, interrupts, Agile I/O, batch ops |
| NtcTemperatureHandler | hf-ntc-thermistor-driver | BaseAdc | Temperature sensing, EMA filter, thresholds, monitoring |
| Tmc9660Handler | hf-tmc9660-driver | BaseSpi / BaseUart | BLDC motor, GPIO/ADC/Temp wrappers, GetDriver/visitDriver |
| Tmc5160Handler | hf-tmc5160-driver | BaseSpi / BaseUart | Stepper motor, 15 subsystems, GetDriver/visitDriver |
| Tle92466edHandler | hf-tle92466ed-driver | BaseSpi | 6-ch solenoid driver, PWM, diagnostics, watchdog |
| Max22200Handler | hf-max22200-driver | BaseSpi | 8-ch solenoid/motor, CDR/VDR, HIT/HOLD, DPM |
| Ws2812Handler | hf-ws2812-rmt-driver | RMT | Addressable LED strip, GetDriver/visitDriver/visitAnimator |
| Logger | — | — | Singleton, colors, ASCII art, per-tag filtering |