Embedded project
Embedded device drivers
C driver library for external devices. Implements a platform-agnostic device interface; provides adapters for the STM32 HAL (I2C/SPI) and a simulated device. First driver: Invensense MPU-60X0 (burst reads, data-ready interrupts; rates, clocks, power modes, filters set via enums). Hardware logging via UART.
| stack | CSTM32 HALI2CSPIUSART |
|---|---|
| repo | msobak/EmbeddedDeviceDrivers |

Overview
A personal project (2026 – ongoing): a platform-agnostic library of C drivers for external devices.
Drivers access hardware only through a generic device interface. The library ships two adapters for it: one for the STM32 HAL (I2C/SPI) and one for a simulated device that is meant to be used for host-side unit testing of the drivers. The same driver code therefore runs on the target and is designed for host-side unit tests (planned).
First driver: Invensense MPU-60X0
Driver for the Invensense MPU-60X0 IMU (accelerometer/gyroscope). Developed and run on an STM32 Nucleo-F446RE.
- Driver configuration via enums: sample rates, clocks, power modes, filters, etc.
- Burst reads of sensor data.
- Data-ready interrupts.
- Unit conversion of raw readings.
- Hardware logging via UART.
Planned next
This library is in its early stages. Next, I plan to add:
- A magnetometer driver.
- An OLED display driver: command-controlled rather than register-mapped, adding a different kind of device interface to the library.
