HF-BNO08x  0.1.0-dev
Loading...
Searching...
No Matches
Esp32UartRvcBus Class Reference

ESP32 UART CommInterface for BNO08x RVC mode. More...

#include <esp32_uart_rvc_bus.hpp>

Inheritance diagram for Esp32UartRvcBus:
[legend]
Collaboration diagram for Esp32UartRvcBus:
[legend]

Classes

struct  UartConfig
 UART configuration for RVC mode. More...
 

Public Member Functions

 Esp32UartRvcBus ()
 
 Esp32UartRvcBus (const UartConfig &config)
 
 ~Esp32UartRvcBus ()
 
BNO085Interface GetInterfaceType () noexcept
 
bool Open () noexcept
 
void Close () noexcept
 
int Read (uint8_t *data, uint32_t length) noexcept
 Read raw bytes from UART.
 
int Write (const uint8_t *, uint32_t) noexcept
 
bool DataAvailable () noexcept
 
void Delay (uint32_t ms) noexcept
 
uint32_t GetTimeUs () noexcept
 
void GpioSet (bno08x::CtrlPin pin, bno08x::GpioSignal signal) noexcept
 Set a control pin to the specified signal state (required by CommInterface)
 
- Public Member Functions inherited from bno08x::CommInterface< Esp32UartRvcBus >
BNO085Interface GetInterfaceType () noexcept
 Report the transport type this implementation provides.
 
bool Open () noexcept
 Open and initialise the communication bus.
 
void Close () noexcept
 Close the communication bus and release resources.
 
int Write (const uint8_t *data, uint32_t length) noexcept
 Write raw bytes to the sensor.
 
int Read (uint8_t *data, uint32_t length) noexcept
 Read raw bytes from the sensor.
 
bool DataAvailable () noexcept
 Check whether the sensor has data ready.
 
void Delay (uint32_t ms) noexcept
 Block for a specified duration.
 
uint32_t GetTimeUs () noexcept
 Return the current monotonic time in microseconds.
 
void GpioSet (CtrlPin pin, GpioSignal signal) noexcept
 Set a control pin to the specified signal state.
 
void GpioSetActive (CtrlPin pin) noexcept
 Assert a control pin (set to ACTIVE).
 
void GpioSetInactive (CtrlPin pin) noexcept
 Deassert a control pin (set to INACTIVE).
 

Additional Inherited Members

- Protected Member Functions inherited from bno08x::CommInterface< Esp32UartRvcBus >
 CommInterface ()=default
 Protected constructor – prevents direct instantiation.
 
 CommInterface (const CommInterface &)=delete
 Non-copyable.
 
 CommInterface (CommInterface &&) noexcept=default
 Movable.
 
 ~CommInterface ()=default
 Protected destructor – prevent polymorphic deletion through base.
 
CommInterfaceoperator= (const CommInterface &)=delete
 Non-copyable.
 
CommInterfaceoperator= (CommInterface &&) noexcept=default
 Movable.
 

Detailed Description

ESP32 UART CommInterface for BNO08x RVC mode.

Reads raw UART bytes that the BNO085 driver's internal RVC frame parser processes. The driver calls Read() one byte at a time to accumulate and validate 19-byte RVC frames.

Constructor & Destructor Documentation

◆ Esp32UartRvcBus() [1/2]

Esp32UartRvcBus::Esp32UartRvcBus ( )
inline

◆ Esp32UartRvcBus() [2/2]

Esp32UartRvcBus::Esp32UartRvcBus ( const UartConfig & config)
inlineexplicit

◆ ~Esp32UartRvcBus()

Esp32UartRvcBus::~Esp32UartRvcBus ( )
inline

Member Function Documentation

◆ Close()

void Esp32UartRvcBus::Close ( )
inlinenoexcept

◆ DataAvailable()

bool Esp32UartRvcBus::DataAvailable ( )
inlinenoexcept

◆ Delay()

void Esp32UartRvcBus::Delay ( uint32_t ms)
inlinenoexcept

◆ GetInterfaceType()

BNO085Interface Esp32UartRvcBus::GetInterfaceType ( )
inlinenoexcept

◆ GetTimeUs()

uint32_t Esp32UartRvcBus::GetTimeUs ( )
inlinenoexcept

◆ GpioSet()

void Esp32UartRvcBus::GpioSet ( bno08x::CtrlPin pin,
bno08x::GpioSignal signal )
inlinenoexcept

Set a control pin to the specified signal state (required by CommInterface)

Maps GpioSignal to physical level based on pin polarity:

  • RSTN: active-low (ACTIVE → GPIO 0, INACTIVE → GPIO 1)
  • BOOTN: active-low (ACTIVE → GPIO 0, INACTIVE → GPIO 1)
  • WAKE/PS0/PS1: not wired in this implementation (no-op)
Parameters
pinWhich control pin to drive
signalACTIVE to assert, INACTIVE to deassert

◆ Open()

bool Esp32UartRvcBus::Open ( )
inlinenoexcept

◆ Read()

int Esp32UartRvcBus::Read ( uint8_t * data,
uint32_t length )
inlinenoexcept

Read raw bytes from UART.

The BNO085 driver calls this one byte at a time to feed the RVC frame parser. Non-blocking: returns 0 immediately if no data available.

◆ Write()

int Esp32UartRvcBus::Write ( const uint8_t * ,
uint32_t  )
inlinenoexcept

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