Skip to content

Conversation

@Byte-Entropy
Copy link

Adds drivers for the MMC5983MA magnetometer (I2C)

  • Implements a stateless I2C wrapper for thread safety.
  • Includes example usage
  • Provides core functionality such as reading product ID, triggering measurements, and performing SET/RESET operations for the magnetometer.

This commit adds the initial, complete C++ driver for the NAU7802 sensor,
placing it in the PeripheralDriversSubmodule.

- Includes a reusable I2C_Wrapper to abstract STM32 HAL functions.
- Implements core logic: init, reset, setGain, and readSensor.
- Adds register definitions, example usage files, and a README.
This commit finalizes the MMC5983MA magnetometer driver for SPI communication. It completes the work from the previous "WIP" commits on this branch.

- Implements the core MMC5983MA driver logic, including 18-bit data parsing and scaling.
- Includes a C++ SPI_Wrapper to abstract STM32 HAL functions.
- Provides complete register definitions in `mmc5983ma_regs.hpp`.
- Adds a `README.md` with usage instructions and a complete example in `main_read_test.cpp`.
…gic" -m "* Refactor I2C Handlers: Switched I2C_Wrapper to a stateless architecture for RTOS safety.

* Feat: Completed MMC5983MA I2C driver implementation (removed legacy SPI code).
* Cleanup: Removed unused Chip Select variables from headers.
* Docs: Updated README to reflect I2C implementation.
@Byte-Entropy Byte-Entropy changed the title Adds I2C magnetometer drivers Add I2C MMC5983MA magnetometer drivers Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants