|
| | Bno08x (Port &port) noexcept |
| | Bind the driver to a port. No I/O, cannot fail.
|
| |
| Result< void > | Begin (const Config &cfg) noexcept |
| | Start a session: validate cfg, bring the bus up, reset the hub and begin waiting for its advertisement. Returns at once; Poll() does the rest and Ready() turns true. Called again, it ends every waiting operation with NotInitialized and starts a new session.
|
| |
| void | Poll (uint32_t now_us) noexcept |
| | Advance the session: read what the hub offers, send the next request, check the time limits. Never waits on the hub; bounded work per call.
|
| |
| State | GetState () const noexcept |
| |
| bool | Ready () const noexcept |
| |
| Result< void > | HardReset () noexcept |
| | Pulse NRST (needs the SetReset hook) and restart the session; pending operations complete with HubReset.
|
| |
| Result< OpId > | Reset () noexcept |
| | Reset the hub with the executable-channel command (DS p23).
|
| |
| Result< OpId > | HubOn () noexcept |
| | Executable channel "on": leave sleep, enable the configured sensors.
|
| |
| Result< OpId > | HubSleep () noexcept |
| | Executable channel "sleep": only always-on and wake sensors keep running.
|
| |
| Result< OpId > | SetFeature (SensorId id, const FeatureConfig &fc) noexcept |
| | Configure a sensor (Set Feature, RM S6.5.4). Completes when the request is written (or on the hub's reply with Config::set_feature_confirm).
|
| |
| Result< OpId > | GetFeature (SensorId id) noexcept |
| | Ask the hub for a sensor's feature report (RM S6.5.3); the answer updates the shadow.
|
| |
| Result< FeatureConfig > | Feature (SensorId id) const noexcept |
| | The driver's shadow of a sensor's feature report (what the hub was last told or said).
|
| |
| Result< OpId > | Flush (SensorId id) noexcept |
| | Force a sensor to flush its batch (RM S6.5.6); completes on the Flush Completed report.
|
| |
| Result< OpId > | ReadProductId () noexcept |
| | Request the product ID (RM S6.3.1).
|
| |
| const ProductId & | Product () const noexcept |
| |
| std::span< const ProductId > | ProductEntries () const noexcept |
| |
| Result< OpId > | ReadMetadata (SensorId id) noexcept |
| | Read a sensor's metadata record (RM S5.1); the result is available from GetMetadata().
|
| |
| const Metadata * | GetMetadata (SensorId id) const noexcept |
| |
| Result< OpId > | ReadFrs (uint16_t record, FrsBuffer &out) noexcept |
| | Read an FRS record into out (RM S6.3.6).
|
| |
| Result< OpId > | WriteFrs (uint16_t record, std::span< const uint32_t > words) noexcept |
| | Write an FRS record (RM S6.3.3 to S6.3.5), then read it back and compare unless Config::frs_verify is false.
|
| |
| Result< OpId > | EraseFrs (uint16_t record) noexcept |
| | Erase an FRS record (a write of length 0).
|
| |
| Result< OpId > | Tare (AxisMask axes, TareBasis basis) noexcept |
| | Tare now (RM S6.4.3.1).
|
| |
| Result< OpId > | PersistTare () noexcept |
| | Persist the last tare to flash (RM S6.4.3.2).
|
| |
| Result< OpId > | SetReorientation (const Quat14 &q) noexcept |
| | Set the run-time reorientation (RM S6.4.3.3).
|
| |
| Result< OpId > | ClearReorientation () noexcept |
| | Clear the run-time reorientation (all-zero quaternion).
|
| |
| Result< OpId > | ConfigureMeCal (const MeCal &cal) noexcept |
| | Configure the motion engine's calibration (RM S6.4.6.1).
|
| |
| Result< OpId > | GetMeCal () noexcept |
| | Read the calibration enables (RM S6.4.6.2); they come back in the OpDone values.
|
| |
| Result< OpId > | SaveDcd () noexcept |
| | Save the dynamic calibration data (RM S6.4.5).
|
| |
| Result< OpId > | SetPeriodicDcd (bool enable) noexcept |
| | Turn the periodic DCD save on or off (RM S6.4.7).
|
| |
| Result< OpId > | ClearDcdAndReset () noexcept |
| | Clear the DCD and reset the hub (RM S6.4.9).
|
| |
| Result< OpId > | GetOscillator () noexcept |
| | Ask for the oscillator type (RM S6.4.8): 0 internal, 1 crystal, 2 external clock.
|
| |
| Result< OpId > | Initialize () noexcept |
| | Re-initialise the sensor hub (RM S6.4.4).
|
| |
| Result< OpId > | GetCounts (SensorId id) noexcept |
| | Read a sensor's counters (RM S6.4.2.1); four counts in the OpDone values.
|
| |
| Result< OpId > | ClearCounts (SensorId id) noexcept |
| | Clear a sensor's counters (RM S6.4.2.2).
|
| |
| Result< OpId > | ReportErrors (uint8_t severity) noexcept |
| | Ask for the SH-2 error queue (RM S6.4.1).
|
| |
| Result< OpId > | StartSimpleCal (uint32_t interval_us) noexcept |
| | Start the simple calibration (RM S6.4.10).
|
| |
| Result< OpId > | FinishSimpleCal () noexcept |
| | Finish the simple calibration; the status is in OpDone.detail.
|
| |
| Result< OpId > | SetMotionIntent (MotionIntent intent) noexcept |
| | Tell the interactive calibration the motion intent (BNO086, RM S6.4.12).
|
| |
| Result< OpId > | SendWheel (const WheelSample &s) noexcept |
| | Report a wheel measurement for dead reckoning (RM S6.4.13).
|
| |
| Result< void > | RvcSend (std::span< const uint8_t > text) noexcept |
| | UART-RVC host input, guarded (ambiguity A8): the $MIB commands of RM S3.1.2 are not verified. Unsupported unless Config::rvc_inputs_experimental is set.
|
| |
| bool | PopEvent (Event &out) noexcept |
| | Take the oldest event.
|
| |
| const Stats & | GetStats () const noexcept |
| |
| Result< Event > | Latest (SensorId id) const noexcept |
| | The most recent sample of a sensor.
|
| |
| uint32_t | AgeUs (const Event &ev) const noexcept |
| | The age of a sample.
|
| |
| std::size_t | TraceLastTransfer (std::span< uint8_t > out) const noexcept |
| | Copy the first bytes of the most recent SHTP transfer the hub sent (the 4-byte header first), for bring-up and fault finding. No I/O: the driver never reads the bus on its own account, because a raw read would race the framing engine (handbook KB-CPP-129).
|
| |
| std::size_t | GetLastTransferLength () const noexcept |
| |
| const detail::Advert & | Advertised () const noexcept |
| |
template<HubPort Port, LimitsLike Limits = DefaultLimits>
class bno08x::Bno08x< Port, Limits >
Driver for one BNO080, BNO085 or BNO086.
Lifecycle: construct with the port (no I/O), Begin(Config) to start a session, call Poll(now_us) from your loop or task (at least once per tenth of the fastest report period, DS p19), and PopEvent() to take what arrived. Every call that touches the hub returns Error::NotInitialized until Begin() has succeeded; no call starts the hub as a side effect.
Optional port hooks, found at compile time:
| Hook | Used for | Without it |
bool SetReset(bool) | NRST: hardware reset in Begin() and HardReset() | HardReset() returns Unsupported; Begin() joins a running hub |
bool SetBootn(bool) | BOOTN held high around a reset, so a stray low level cannot start the bootloader | Not driven |
bool TakeIntTimestamp(uint32_t&) | The time of the H_INTN edge, for exact sample times | The time of the Poll() that saw H_INTN |
bool IntAsserted() (UART transports) | The H_INTN level | The first received byte is the time reference |
void Log(LogLevel, const char*) | One line per lifecycle event or failure | Nothing is logged |
A hook declared with the wrong signature is a compile error.
- Template Parameters
-
| Port | Your class derived from HubInterface<Port> that names its kTransport. |
| Limits | The sizes of the fixed buffers; DefaultLimits unless you tune them. |