$ show Ultrawipf/OpenFFBoard
OpenFFBoard is an open-source force feedback interface board designed for simulation devices like steering wheels and joysticks. The firmware provides force feedback effects via USB HID to gaming/simulation software while processing inputs from encoders, analog sources, buttons, and CAN bus. It features a modular architecture based on FreeRTOS with TinyUSB USB stack, supporting multiple motor drivers (PWM, TMC4671, ODrive, VESC, RMD) and a command interface for runtime configuration. Settings persist to flash/EEPROM via an abstraction layer with automatic registration. The project targets STM32 microcontrollers (F407VG, F407VG_DISCO, F411RE) and includes extensive hardware abstraction layers, plugin architecture for extensibility, and clean C++ wrappers for FreeRTOS primitives.
The LLM identified 4 files worth highlighting for reuse:
A clean implementation of the command pattern supporting multiple transports (USB CDC, UART, HID). Features command registration, parsing, and execution with reply isolation. Minimal dependencies make it easily extractable for other embedded systems needing runtime configuration.
Abstract base class for objects requiring persistent storage in flash. Features automatic registration system, wear leveling considerations, and clean separation of storage concerns. Could be reused in any embedded project needing configurable parameters with minimal adaptation.
Type-safe C++ RAII wrapper for FreeRTOS threads providing exception safety and cleaner interface than C API. Part of a complete set of FreeRTOS wrappers (mutex, semaphore, queue, timer) that significantly improve usability and safety in FreeRTOS+C++ projects.
Generic template-based plugin architecture enabling runtime selection of implementations for interfaces like main classes, motor drivers, and encoders. Demonstrates advanced metaprogramming for type-safe, extensible systems with minimal coupling.