BNO08x Driver
API reference
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
bno08x::detail Namespace Reference

Typedefs

template<typename Port >
using GpioSetResult = decltype(std::declval< Port & >().GpioSet(std::declval< CtrlPin >(), std::declval< GpioSignal >()))
 Return type of Port::GpioSet(CtrlPin, GpioSignal).
 

Functions

std::atomic< const void * > & Sh2SessionOwner () noexcept
 Owner of the process-wide SH-2 session (nullptr when free).
 
template<typename Port >
bool GpioSet (Port &port, CtrlPin pin, GpioSignal signal) noexcept
 Call the port's GpioSet() and return its status.
 

Variables

template<typename Port >
constexpr bool kGpioSetReportsStatus
 True when the port's GpioSet() reports a status (returns bool).
 
template<typename Port >
constexpr bool kHasI2cAddressHooks = HasI2cAddressHooks<Port>::value
 True when the port provides the optional I2C address hooks.
 

Typedef Documentation

◆ GpioSetResult

template<typename Port >
using bno08x::detail::GpioSetResult = typedef decltype(std::declval<Port&>().GpioSet(std::declval<CtrlPin>(), std::declval<GpioSignal>()))

Return type of Port::GpioSet(CtrlPin, GpioSignal).

Function Documentation

◆ GpioSet()

template<typename Port >
bool bno08x::detail::GpioSet ( Port &  port,
CtrlPin  pin,
GpioSignal  signal 
)
inlinenoexcept

Call the port's GpioSet() and return its status.

A bool result is returned as-is; a void GpioSet() (the earlier contract) is treated as always successful. Any other return type is rejected at compile time so that an SDK status code (for example an esp_err_t, where 0 means success) cannot be read as a bool.

◆ Sh2SessionOwner()

std::atomic< const void * > & bno08x::detail::Sh2SessionOwner ( )
inlinenoexcept

Owner of the process-wide SH-2 session (nullptr when free).

Shared by every BNO085<CommType> instantiation, since they all use the same vendor library state.

Variable Documentation

◆ kGpioSetReportsStatus

template<typename Port >
constexpr bool bno08x::detail::kGpioSetReportsStatus
inlineconstexpr
Initial value:
=
std::is_same_v<std::remove_cv_t<std::remove_reference_t<GpioSetResult<Port>>>, bool>

True when the port's GpioSet() reports a status (returns bool).

◆ kHasI2cAddressHooks

template<typename Port >
constexpr bool bno08x::detail::kHasI2cAddressHooks = HasI2cAddressHooks<Port>::value
inlineconstexpr

True when the port provides the optional I2C address hooks.

uint8_t GetI2cAddress() returns the 7-bit address the port talks to and bool SetI2cAddress(uint8_t) changes it (also while the bus is open). The driver uses them to reach the bootloader at 0x28 / 0x29 during a firmware update over I2C (datasheet 1000-3927 section 1.4) and to restore the application address afterwards.