|
BNO08X Driver 0.1.0
API reference
|
The BNO08x protocol constants. More...
Variables | |
| constexpr uint8_t | kChanCommand = 0 |
| SHTP command channel (advertisement, error list). | |
| constexpr uint8_t | kChanExecutable = 1 |
| Executable ("device") channel: reset, on, sleep. | |
| constexpr uint8_t | kChanControl |
| Sensor hub control: features, product ID, FRS, commands. | |
| constexpr uint8_t | kChanInputNormal = 3 |
| Input reports of sensors that are not wake-up. | |
| constexpr uint8_t | kChanInputWake = 4 |
| Input reports of wake-up sensors. | |
| constexpr uint8_t | kChanGyroRv = 5 |
| Gyro-integrated rotation vector, no report ID. | |
| constexpr std::size_t | kChannelCount = 6 |
| Number of channels the driver tracks. | |
| constexpr uint8_t | kExecReset = 1 |
| Host to hub: reset the hub. | |
| constexpr uint8_t | kExecOn = 2 |
| Host to hub: leave sleep, enable configured sensors. | |
| constexpr uint8_t | kExecSleep |
| Host to hub: sleep; only always-on and wake sensors run. | |
| constexpr uint8_t | kExecResetComplete = 1 |
| Hub to host: reset complete. | |
| constexpr uint8_t | kShtpAdvertise = 0 |
| Command and response 0: advertisement. | |
| constexpr uint8_t | kShtpErrorList = 1 |
| Command and response 1: error list. | |
| constexpr uint8_t | kShtpErrorCodeMax = 12 |
| Highest defined SHTP error code (Figure 15). | |
| constexpr uint8_t | kRepGetFeatureReq = 0xFE |
| Get Feature Request (2 bytes). | |
| constexpr uint8_t | kRepSetFeature = 0xFD |
| Set Feature Command (17 bytes). | |
| constexpr uint8_t | kRepGetFeatureRsp = 0xFC |
| Get Feature Response (17 bytes). | |
| constexpr uint8_t | kRepBaseTimestamp = 0xFB |
| Base Timestamp Reference (5 bytes). | |
| constexpr uint8_t | kRepTimestampRebase = 0xFA |
| Timestamp Rebase (5 bytes). | |
| constexpr uint8_t | kRepProductIdReq = 0xF9 |
| Product ID Request (2 bytes). | |
| constexpr uint8_t | kRepProductIdRsp = 0xF8 |
| Product ID Response (16 bytes). | |
| constexpr uint8_t | kRepFrsWriteReq = 0xF7 |
| FRS Write Request (6 bytes). | |
| constexpr uint8_t | kRepFrsWriteData = 0xF6 |
| FRS Write Data Request (12 bytes). | |
| constexpr uint8_t | kRepFrsWriteRsp = 0xF5 |
| FRS Write Response (4 bytes). | |
| constexpr uint8_t | kRepFrsReadReq = 0xF4 |
| FRS Read Request (8 bytes). | |
| constexpr uint8_t | kRepFrsReadRsp = 0xF3 |
| FRS Read Response (16 bytes). | |
| constexpr uint8_t | kRepCommandReq = 0xF2 |
| Command Request (12 bytes). | |
| constexpr uint8_t | kRepCommandRsp = 0xF1 |
| Command Response (16 bytes). | |
| constexpr uint8_t | kRepForceFlush = 0xF0 |
| Force Sensor Flush (2 bytes). | |
| constexpr uint8_t | kRepFlushDone = 0xEF |
| Flush Completed (2 bytes). | |
| constexpr uint8_t | kCmdErrors = 0x01 |
| Report errors. | |
| constexpr uint8_t | kCmdCounters = 0x02 |
| Counter commands. | |
| constexpr uint8_t | kCmdTare = 0x03 |
| Tare commands. | |
| constexpr uint8_t | kCmdInitialize = 0x04 |
| Initialise a subsystem. | |
| constexpr uint8_t | kCmdSaveDcd = 0x06 |
| Save the dynamic calibration data. | |
| constexpr uint8_t | kCmdMeCal = 0x07 |
| Motion engine calibration enables. | |
| constexpr uint8_t | kCmdPeriodicDcd = 0x09 |
| Periodic DCD save on or off. | |
| constexpr uint8_t | kCmdOscillator = 0x0A |
| Oscillator type. | |
| constexpr uint8_t | kCmdClearDcdReset = 0x0B |
| Clear DCD and reset. | |
| constexpr uint8_t | kCmdSimpleCal = 0x0C |
| Simple calibration start and finish. | |
| constexpr uint8_t | kCmdBootloader = 0x0D |
| Bootloader (FSP200 only; never sent). | |
| constexpr uint8_t | kCmdInteractiveCal |
| Interactive calibration motion intent (BNO086). | |
| constexpr uint8_t | kCmdWheel = 0x0F |
| Wheel request (dead reckoning input). | |
| constexpr uint8_t | kCmdUnsolicited |
| Bit 7 of a response's command: autonomous response. | |
| constexpr std::size_t | kLenGetFeature = 17 |
| Set Feature and Get Feature Response. | |
| constexpr std::size_t | kLenProductId = 16 |
| Product ID Response. | |
| constexpr std::size_t | kLenCommand = 12 |
| Command Request. | |
| constexpr std::size_t | kLenCommandRsp = 16 |
| Command Response. | |
| constexpr std::size_t | kLenFrsWriteReq = 6 |
| FRS Write Request. | |
| constexpr std::size_t | kLenFrsWriteData = 12 |
| FRS Write Data Request. | |
| constexpr std::size_t | kLenFrsWriteRsp = 4 |
| FRS Write Response. | |
| constexpr std::size_t | kLenFrsReadReq = 8 |
| FRS Read Request. | |
| constexpr std::size_t | kLenFrsReadRsp = 16 |
| FRS Read Response. | |
| constexpr std::size_t | kLenTimestamp = 5 |
| Base Timestamp and Rebase. | |
| constexpr std::size_t | kLenGyroRv = 14 |
| Gyro-integrated rotation vector (channel 5). | |
| constexpr std::size_t | kLenSensorHeader = 4 |
| Report ID, sequence, status, delay. | |
| constexpr std::size_t | kShtpHeaderLen = 4 |
| SHTP header: length (2), channel, sequence. | |
| constexpr uint8_t | kFlagRelative = 0x01 |
| Bit 0: change sensitivity is relative. | |
| constexpr uint8_t | kFlagChangeEnable = 0x02 |
| Bit 1: change sensitivity enabled. | |
| constexpr uint8_t | kFlagWake = 0x04 |
| Bit 2: wake-up sensor. | |
| constexpr uint8_t | kFlagAlwaysOn = 0x08 |
| Bit 3: always-on sensor. | |
| constexpr uint16_t | kFrsStaticCalAgm = 0x7979 |
| Static calibration AGM (proprietary). | |
| constexpr uint16_t | kFrsNominalCalAgm = 0x4D4D |
| Nominal calibration AGM (read only). | |
| constexpr uint16_t | kFrsStaticCalSra = 0x8A8A |
| Static calibration SRA (proprietary). | |
| constexpr uint16_t | kFrsNominalCalSra = 0x4E4E |
| Nominal calibration SRA (read only). | |
| constexpr uint16_t | kFrsDynamicCal = 0x1F1F |
| Dynamic calibration data (DCD). | |
| constexpr uint16_t | kFrsPowerManagement |
| MotionEngine power management, stability. | |
| constexpr uint16_t | kFrsSystemOrientation = 0x2D3E |
| System orientation quaternion. | |
| constexpr uint16_t | kFrsPrimaryAccelOrientation |
| Primary accelerometer orientation. | |
| constexpr uint16_t | kFrsScreenAccelOrientation |
| Screen rotation accelerometer orientation. | |
| constexpr uint16_t | kFrsGyroOrientation = 0x2D46 |
| Gyroscope orientation. | |
| constexpr uint16_t | kFrsMagOrientation = 0x2D4C |
| Magnetometer orientation. | |
| constexpr uint16_t | kFrsArvrRotationVector |
| AR/VR stabilisation, rotation vector. | |
| constexpr uint16_t | kFrsArvrGameRotationVector |
| AR/VR stabilisation, game rotation vector. | |
| constexpr uint16_t | kFrsSignificantMotion |
| Significant motion detector configuration. | |
| constexpr uint16_t | kFrsShake = 0x7D7D |
| Shake detector configuration. | |
| constexpr uint16_t | kFrsMaxFusionPeriod = 0xD7D7 |
| Maximum fusion period. | |
| constexpr uint16_t | kFrsSerialNumber = 0x4B4B |
| Serial number. | |
| constexpr uint16_t | kFrsEnvPressureCal = 0x39AF |
| Environmental calibration: pressure. | |
| constexpr uint16_t | kFrsEnvTemperatureCal |
| Environmental calibration: temperature. | |
| constexpr uint16_t | kFrsEnvHumidityCal = 0x1AC9 |
| Environmental calibration: humidity. | |
| constexpr uint16_t | kFrsEnvAmbientLightCal |
| Environmental calibration: ambient light. | |
| constexpr uint16_t | kFrsEnvProximityCal = 0x4DA2 |
| Environmental calibration: proximity. | |
| constexpr uint16_t | kFrsAlsCal = 0xD401 |
| ALS calibration (device specific). | |
| constexpr uint16_t | kFrsProximityCal |
| Proximity sensor calibration (device specific). | |
| constexpr uint16_t | kFrsPickupConfig = 0x1B2A |
| Pickup detector configuration. | |
| constexpr uint16_t | kFrsFlipConfig = 0xFC94 |
| Flip detector configuration. | |
| constexpr uint16_t | kFrsStabilityDetectorConfig |
| Stability detector configuration. | |
| constexpr uint16_t | kFrsActivityConfig = 0xED88 |
| Activity tracker configuration. | |
| constexpr uint16_t | kFrsSleepConfig = 0xED87 |
| Sleep detector configuration. | |
| constexpr uint16_t | kFrsTiltConfig = 0xED89 |
| Tilt detector configuration. | |
| constexpr uint16_t | kFrsPocketConfig = 0xEF27 |
| Pocket detector configuration. | |
| constexpr uint16_t | kFrsCircleConfig = 0xEE51 |
| Circle detector configuration. | |
| constexpr uint16_t | kFrsUserRecord = 0x74B4 |
| User record, up to 64 words. | |
| constexpr uint16_t | kFrsTimeSource = 0xD403 |
| MotionEngine time source selection. | |
| constexpr uint16_t | kFrsUartFormat = 0xA1A1 |
| UART output format (RVC). | |
| constexpr uint16_t | kFrsGyroRvConfig |
| Gyro-integrated rotation vector configuration. | |
| constexpr uint16_t | kFrsFusionControl = 0xA1A3 |
| Fusion control flags. | |
| constexpr uint16_t | kFrsSimpleCalConfig |
| Simple calibration configuration (proprietary). | |
| constexpr uint16_t | kFrsSimpleCalNominal |
| Simple calibration nominal (proprietary). | |
| constexpr uint16_t | kFrsMetadataFirst |
| First sensor metadata record (raw accelerometer). | |
| constexpr uint16_t | kFrsMetadataLast |
| Last sensor metadata record (motion request). | |
| constexpr std::size_t | kUserRecordWords = 64 |
| Largest user record, in 32-bit words. | |
| constexpr uint8_t | kFrsWWordsReceived = 0 |
| Write status: word(s) received. | |
| constexpr uint8_t | kFrsWUnrecognised = 1 |
| Write status: unrecognised FRS type. | |
| constexpr uint8_t | kFrsWBusy = 2 |
| Write status: busy. | |
| constexpr uint8_t | kFrsWCompleted = 3 |
| Write status: write completed. | |
| constexpr uint8_t | kFrsWReady = 4 |
| Write status: write mode entered or ready. | |
| constexpr uint8_t | kFrsWFailed = 5 |
| Write status: write failed. | |
| constexpr uint8_t | kFrsWNotInWriteMode = 6 |
| Write status: data while not in write mode. | |
| constexpr uint8_t | kFrsWInvalidLength = 7 |
| Write status: invalid length. | |
| constexpr uint8_t | kFrsWRecordValid = 8 |
| Write status: record valid. | |
| constexpr uint8_t | kFrsWRecordInvalid = 9 |
| Write status: record invalid. | |
| constexpr uint8_t | kFrsWDeviceError = 10 |
| Write status: device error (deprecated). | |
| constexpr uint8_t | kFrsWReadOnly = 11 |
| Write status: record is read only. | |
| constexpr uint8_t | kFrsWMemoryFull = 12 |
| Write status: FRS memory is full. | |
| constexpr uint8_t | kFrsRNoError = 0 |
| Read status: no error. | |
| constexpr uint8_t | kFrsRUnrecognised = 1 |
| Read status: unrecognised FRS type. | |
| constexpr uint8_t | kFrsRBusy = 2 |
| Read status: busy. | |
| constexpr uint8_t | kFrsRCompleted = 3 |
| Read status: read record completed. | |
| constexpr uint8_t | kFrsREmpty = 5 |
| Read status: record empty. | |
| constexpr uint8_t | kFrsRDeviceError = 8 |
| Read status: device error. | |
| constexpr uint8_t | kCalAccel = 0x01 |
| Accelerometer calibration. | |
| constexpr uint8_t | kCalGyro = 0x02 |
| Gyroscope calibration. | |
| constexpr uint8_t | kCalMag = 0x04 |
| Magnetometer calibration. | |
| constexpr uint8_t | kCalPlanar = 0x08 |
| Planar accelerometer calibration. | |
| constexpr uint8_t | kCalOnTable = 0x10 |
| On-table calibration. | |
| constexpr uint8_t | kI2cAddrLow = 0x4A |
| 7-bit I2C address with SA0 low (DS p14). | |
| constexpr uint8_t | kI2cAddrHigh = 0x4B |
| 7-bit I2C address with SA0 high. | |
| constexpr uint8_t | kBootI2cAddrLow |
| Bootloader I2C address, SA0 low (DS p29; unused). | |
| constexpr uint8_t | kBootI2cAddrHigh = 0x29 |
| Bootloader I2C address, SA0 high (unused). | |
| constexpr uint32_t | kI2cMaxHz = 400'000 |
| Highest I2C clock (DS p46). | |
| constexpr uint32_t | kSpiMaxHz = 3'000'000 |
| Highest SPI clock, mode 3 (DS p19, p47). | |
| constexpr uint32_t | kUartShtpBaud = 3'000'000 |
| UART-SHTP rate, 8N1 (DS p17). | |
| constexpr uint32_t | kUartRvcBaud = 115'200 |
| UART-RVC rate, 8N1 (DS p20). | |
| constexpr uint32_t | kUartHostByteGapUs |
| Minimum gap between bytes from the host (SHTP S4.5). | |
| constexpr uint32_t | kResetPulseMinNs = 10 |
| Shortest NRST pulse (DS p47). | |
| constexpr uint32_t | kStartupT1Ms |
| Internal initialisation after reset, at least (DS p47). | |
| constexpr uint32_t | kStartupT2Ms = 4 |
| Internal configuration, about (DS p47). | |
| constexpr uint32_t | kWakeTypicalUs = 150 |
| WAKE assert to H_INTN assert, typical (DS p48). | |
| constexpr uint32_t | kHintHostTimeoutMs |
| Hub-side wait for the host after H_INTN (DS p19). | |
| constexpr std::size_t | kRvcFrameLen = 19 |
| UART-RVC frame length (DS p21). | |
| constexpr uint32_t | kRvcRateHz = 100 |
| UART-RVC frame rate (DS p20). | |
| constexpr uint32_t | kReportRateMinPct |
| A request is served at 0.9 x or more (DS p50). | |
| constexpr uint32_t | kReportRateMaxPct = 210 |
| and at 2.1 x or less (DS p50). | |
| constexpr uint32_t | kDelayTickUs |
| Unit of the delay field and the timestamps (RM S7.2). | |
| constexpr uint32_t | kSupplyVddMinMv = 2400 |
| VDD minimum (DS p45). | |
| constexpr uint32_t | kSupplyVddMaxMv = 3600 |
| VDD maximum (DS p45). | |
| constexpr uint32_t | kSupplyVddioMinMv |
| VDDIO minimum (DS p45; pin table says 1650). | |
| constexpr uint32_t | kSupplyVddioMaxMv = 3600 |
| VDDIO maximum (DS p45). | |
The BNO08x protocol constants.