esp32_BNO08x 1.4 C++ BNO08x IMU driver component for esp-idf.

Classes | Macros
BNO08xSH2HAL.hpp File Reference
`#include "sh2.h"`
`#include "sh2_SensorValue.h"`
`#include "sh2_err.h"`
`#include <esp_log.h>`
`#include <esp_timer.h>`
`#include "BNO08xPrivateTypes.hpp"`
Include dependency graph for BNO08xSH2HAL.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | BNO08xSH2HAL
| Fully static class containing callback implementations for sh2 HAL lib. More...

## Macros
#define | UINT16_CLR_MSB(val_16bit) ((val_16bit) & 0x00FFU)
| Clears the most significant byte of a 16-bit value. More...
#define | UINT16_CLR_LSB(val_16bit) ((val_16bit) & 0xFF00U)
| Clears the least significant byte of a 16-bit value. More...
#define | UINT32_CLR_BYTE(val_32bit, byte2clear) ((val_32bit) & ~(0xFFUL << (byte2clear * 8UL)))
| Clears a specified byte in a 32-bit value. More...
#define | UINT32_MSK_BYTE(val_32bit, byte2mask) ((val_32bit) & (0xFFUL << (byte2mask * 8UL)))
| Masks a specified byte in a 32-bit value. More...
#define | PARSE_PACKET_LENGTH(header) (UINT16_CLR_LSB(static_cast<uint16_t>(header[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(header[0])))
| Parse length from SHTP packet header. More...

## Detailed Description

Author
  Myles Parfeniuk

## Macro Definition Documentation

## ◆ PARSE_PACKET_LENGTH

#define PARSE_PACKET_LENGTH | ( |  | header | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(header[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(header[0])))

Parse length from SHTP packet header.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Length of SHTP packet.

## ◆ UINT16_CLR_LSB

#define UINT16_CLR_LSB | ( |  | val_16bit | ) | ((val_16bit) & 0xFF00U)

Clears the least significant byte of a 16-bit value.

Parameters

  val_16bit | The 16-bit value to modify.

Returns
  The value with the MSB cleared.

## ◆ UINT16_CLR_MSB

#define UINT16_CLR_MSB | ( |  | val_16bit | ) | ((val_16bit) & 0x00FFU)

Clears the most significant byte of a 16-bit value.

Parameters

  val_16bit | The 16-bit value to modify.

Returns
  The value with the MSB cleared.

## ◆ UINT32_CLR_BYTE

#define UINT32_CLR_BYTE | ( |  | val_32bit,
|  |  | byte2clear
| ) |  | ((val_32bit) & ~(0xFFUL << (byte2clear * 8UL)))

Clears a specified byte in a 32-bit value.

Parameters

  val_32bit | The 32-bit value to modify.
  byte2clear | The byte index to clear (0 = LSB, 3 = MSB).

Returns
  The value with the specified byte cleared.

## ◆ UINT32_MSK_BYTE

#define UINT32_MSK_BYTE | ( |  | val_32bit,
|  |  | byte2mask
| ) |  | ((val_32bit) & (0xFFUL << (byte2mask * 8UL)))

Masks a specified byte in a 32-bit value.

Parameters

  val_32bit | The 32-bit value to modify.
  byte2mask | The byte index to mask (0 = LSB, 3 = MSB).

Returns
  The value with the specified byte masked.