HardFOC Core
API reference
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Bno08xDriverImpl< CommType > Class Template Reference

Concrete type-erased driver wrapper. More...

#include <Bno08xHandler.h>

Inheritance diagram for Bno08xDriverImpl< CommType >:
IBno08xDriverOps

Public Member Functions

 Bno08xDriverImpl (CommType &&comm) noexcept
 Construct with a pre-built comm adapter (moved in).
 
bool Begin () noexcept override
 
void Update () noexcept override
 
bool EnableSensor (BNO085Sensor sensor, uint32_t interval_ms, float sensitivity) noexcept override
 
bool DisableSensor (BNO085Sensor sensor) noexcept override
 
void SetCallback (SensorCallback cb) noexcept override
 
bool HasNewData (BNO085Sensor sensor) const noexcept override
 
SensorEvent GetLatest (BNO085Sensor sensor) const noexcept override
 
int GetLastError () const noexcept override
 
bool HardwareReset (uint32_t lowMs) noexcept override
 Pin calls return false when the port could not drive a pin (GPIO error).
 
bool SetBootPin (bool state) noexcept override
 
bool SetWakePin (bool state) noexcept override
 
bool SelectInterface (BNO085Interface iface) noexcept override
 
BNO085Interface GetInterfaceType () noexcept override
 
- Public Member Functions inherited from IBno08xDriverOps
virtual ~IBno08xDriverOps () noexcept=default
 

Private Attributes

CommType comm_
 CRTP comm adapter (must outlive driver_)
 
BNO085< CommType > driver_
 BNO085 driver instance (mutable: GetLatest clears internal flag)
 

Detailed Description

template<typename CommType>
class Bno08xDriverImpl< CommType >

Concrete type-erased driver wrapper.

Owns both the CRTP comm adapter (as a member) and the BNO085 driver instance. The comm adapter is declared first to ensure it outlives the driver (which stores a reference to it).

Template Parameters
CommTypeThe CRTP communication adapter type.

Constructor & Destructor Documentation

◆ Bno08xDriverImpl()

template<typename CommType >
Bno08xDriverImpl< CommType >::Bno08xDriverImpl ( CommType &&  comm)
inlineexplicitnoexcept

Construct with a pre-built comm adapter (moved in).

Member Function Documentation

◆ Begin()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::Begin ( )
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ DisableSensor()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::DisableSensor ( BNO085Sensor  sensor)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ EnableSensor()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::EnableSensor ( BNO085Sensor  sensor,
uint32_t  interval_ms,
float  sensitivity 
)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ GetInterfaceType()

template<typename CommType >
BNO085Interface Bno08xDriverImpl< CommType >::GetInterfaceType ( )
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ GetLastError()

template<typename CommType >
int Bno08xDriverImpl< CommType >::GetLastError ( ) const
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ GetLatest()

template<typename CommType >
SensorEvent Bno08xDriverImpl< CommType >::GetLatest ( BNO085Sensor  sensor) const
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ HardwareReset()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::HardwareReset ( uint32_t  lowMs)
inlineoverridevirtualnoexcept

Pin calls return false when the port could not drive a pin (GPIO error).

Implements IBno08xDriverOps.

◆ HasNewData()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::HasNewData ( BNO085Sensor  sensor) const
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ SelectInterface()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::SelectInterface ( BNO085Interface  iface)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ SetBootPin()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::SetBootPin ( bool  state)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ SetCallback()

template<typename CommType >
void Bno08xDriverImpl< CommType >::SetCallback ( SensorCallback  cb)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ SetWakePin()

template<typename CommType >
bool Bno08xDriverImpl< CommType >::SetWakePin ( bool  state)
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

◆ Update()

template<typename CommType >
void Bno08xDriverImpl< CommType >::Update ( )
inlineoverridevirtualnoexcept

Implements IBno08xDriverOps.

Member Data Documentation

◆ comm_

template<typename CommType >
CommType Bno08xDriverImpl< CommType >::comm_
private

CRTP comm adapter (must outlive driver_)

◆ driver_

template<typename CommType >
BNO085<CommType> Bno08xDriverImpl< CommType >::driver_
mutableprivate

BNO085 driver instance (mutable: GetLatest clears internal flag)


The documentation for this class was generated from the following file: