BNO08X Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
bno08x::Config Struct Reference

The configuration of a session. Config{} is the recommended setup for a BNO085. More...

#include <bno08x_types.hpp>

Public Member Functions

constexpr bool TimesValid () const noexcept
 Whether every time limit is non-zero and the SPI WAKE wait ends before an operation's limit, so WAKE is always released first (DS p18).
 
constexpr bool Valid () const noexcept
 Whether every field is inside its documented range.
 

Public Attributes

Variant variant {Variant::Bno085}
 Chip of the family; selects behaviour.
 
ReadPolicy read_policy {ReadPolicy::HeaderThenRest}
 How I2C and SPI reads are sized.
 
uint8_t i2c_address {reg::kI2cAddrLow}
 I2C: 0x4A (SA0 low) or 0x4B (SA0 high).
 
uint16_t fixed_read_bytes {64}
 Bytes per read for ReadPolicy::Fixed (header included).
 
bool strict_variant {true}
 Refuse features the chip lacks with Variant.
 
bool auto_restore {true}
 Re-send enabled features after a hub restart.
 
bool poll_without_int {false}
 Guarded: read on a cadence, ignoring H_INTN (I2C only).
 
bool require_init_response {true}
 Wait for the unsolicited initialise response at start.
 
bool frs_verify {true}
 Read an FRS record back after writing it.
 
bool set_feature_confirm {false}
 Complete SetFeature on the hub's reply, not when written.
 
bool strict_raw {false}
 Refuse a raw sensor whose base sensor is off.
 
bool strict_cont_len {true}
 Require continuation length = remaining + 4.
 
bool strict_padding {false}
 Count non-zero padding bytes.
 
bool tare_any_mask {false}
 Allow tare axis masks other than 0x07 and 0x04.
 
bool rvc_strict {false}
 UART-RVC: also require the index to increment by one.
 
bool rvc_inputs_experimental {false}
 Guarded: allow the unverified $MIB host inputs.
 
uint16_t startup_timeout_ms {500}
 Limit for each start-up wait (advertisement, ready).
 
uint16_t op_timeout_ms {1000}
 Limit for one operation.
 
uint16_t frs_write_timeout_ms {5000}
 Limit for one FRS write step.
 
uint32_t wake_timeout_us {10000}
 SPI: limit for H_INTN after WAKE.
 
uint32_t reset_pulse_us {1000}
 NRST low time; the datasheet minimum is 10 ns.
 
uint16_t advert_retry_ms {100}
 Without NRST: wait before asking for the advertisement.
 
uint16_t uart_token_timeout_ms
 UART-SHTP: BSN validity when the hub did not advertise one.
 
uint16_t uart_bsq_retry_ms {20}
 UART-SHTP: wait for a BSN before the query is sent again.
 
uint16_t poll_interval_ms {10}
 poll_without_int: read cadence.
 
uint8_t resync_limit {4}
 Violations within the window that force a recovery.
 
uint16_t resync_window_ms {100}
 The window of resync_limit.
 
uint8_t product_id_entries {1}
 Product ID responses accepted (1, up to 5).
 

Detailed Description

The configuration of a session. Config{} is the recommended setup for a BNO085.

Member Function Documentation

◆ TimesValid()

constexpr bool bno08x::Config::TimesValid ( ) const
inlineconstexprnoexcept

Whether every time limit is non-zero and the SPI WAKE wait ends before an operation's limit, so WAKE is always released first (DS p18).

Returns
true when the time fields are valid.

◆ Valid()

constexpr bool bno08x::Config::Valid ( ) const
inlineconstexprnoexcept

Whether every field is inside its documented range.

Returns
true when Begin() would accept the configuration.

Member Data Documentation

◆ uart_token_timeout_ms

uint16_t bno08x::Config::uart_token_timeout_ms
Initial value:
{
1000}

UART-SHTP: BSN validity when the hub did not advertise one.


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