|
HF-Core Platform 0.1.0-dev
Hardware-Agnostic Handler Layer & RTOS Utilities for HardFOC
|
Unified handler for BNO08x IMU sensor family with multi-interface support. More...
#include <cstdint>#include <memory>#include <array>#include <functional>#include <type_traits>#include <utility>#include "core/hf-core-drivers/external/hf-bno08x-driver/inc/bno08x.hpp"#include "core/hf-core-drivers/external/hf-bno08x-driver/inc/bno08x_comm_interface.hpp"#include "base/BaseI2c.h"#include "base/BaseSpi.h"#include "base/BaseGpio.h"#include "RtosMutex.h"Go to the source code of this file.
Classes | |
| class | HalI2cBno08xComm |
| I2C CRTP communication adapter for BNO08x. More... | |
| class | HalSpiBno08xComm |
| SPI CRTP communication adapter for BNO08x. More... | |
| class | IBno08xDriverOps |
| Internal abstract interface for type-erasing the BNO085<CommType> template. More... | |
| class | Bno08xDriverImpl< CommType > |
| Concrete type-erased driver wrapper. More... | |
| struct | Bno08xVector3 |
| Enhanced vector with timestamp and accuracy. More... | |
| struct | Bno08xQuaternion |
| Enhanced quaternion with timestamp and accuracy. More... | |
| struct | Bno08xEulerAngles |
| Euler angles derived from quaternion. More... | |
| struct | Bno08xImuData |
| Complete IMU sensor data structure. More... | |
| struct | Bno08xActivityData |
| Activity and gesture detection data. More... | |
| struct | Bno08xCalibrationStatus |
| Sensor calibration status. More... | |
| struct | Bno08xConfig |
| BNO08x configuration structure. More... | |
| class | Bno08xHandler |
| Unified handler for BNO08x IMU sensor family. More... | |
Enumerations | |
| enum class | Bno08xError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , INVALID_PARAMETER , COMMUNICATION_FAILED , SENSOR_NOT_RESPONDING , CALIBRATION_FAILED , FIRMWARE_UPDATE_FAILED , TIMEOUT , MUTEX_LOCK_FAILED , INVALID_INTERFACE , SENSOR_NOT_ENABLED , DATA_NOT_AVAILABLE , HARDWARE_ERROR , UNSUPPORTED_OPERATION } |
| BNO08x handler error codes for consistent error reporting. More... | |
Functions | |
| constexpr const char * | Bno08xErrorToString (Bno08xError error) noexcept |
| Convert Bno08xError to string for debugging. | |
| std::unique_ptr< Bno08xHandler > | CreateBno08xHandlerI2c (BaseI2c &i2c_device, const Bno08xConfig &config=Bno08xConfig{}, BaseGpio *reset_gpio=nullptr, BaseGpio *int_gpio=nullptr) noexcept |
| Create BNO08x handler with I2C interface. | |
| std::unique_ptr< Bno08xHandler > | CreateBno08xHandlerSpi (BaseSpi &spi_device, const Bno08xConfig &config=Bno08xConfig{}, BaseGpio *reset_gpio=nullptr, BaseGpio *int_gpio=nullptr, BaseGpio *wake_gpio=nullptr) noexcept |
| Create BNO08x handler with SPI interface. | |
Unified handler for BNO08x IMU sensor family with multi-interface support.
This file provides the complete HAL-level integration for a BNO08x IMU sensor. It bridges the HardFOC base interfaces (BaseI2c, BaseSpi, BaseGpio) with the templated BNO085<CommType> driver from the hf-bno08x-driver library.
The file contains four layers:
The handler owns all its internal resources:
The handler uses RtosMutex (recursive) for thread-safe access to all handler-level operations.
|
strong |
BNO08x handler error codes for consistent error reporting.
|
constexprnoexcept |
Convert Bno08xError to string for debugging.
|
inlinenoexcept |
Create BNO08x handler with I2C interface.
| i2c_device | BaseI2c instance (address pre-configured) |
| config | Sensor configuration (default: Bno08xConfig{}) |
| reset_gpio | Optional RSTN GPIO (active-low) |
| int_gpio | Optional INT GPIO (active-low, data ready) |
|
inlinenoexcept |
Create BNO08x handler with SPI interface.
| spi_device | BaseSpi instance |
| config | Sensor configuration (default: Bno08xConfig{}) |
| reset_gpio | Optional RSTN GPIO (active-low) |
| int_gpio | Optional INT GPIO (active-low, data ready) |
| wake_gpio | Optional WAKE GPIO (active-low, SPI mode) |