Loading...
Searching...
No Matches
BNO08x_macros.hpp File Reference
`#include <inttypes.h>`
`#include <freertos/FreeRTOS.h>`
`#include <freertos/event_groups.h>`
Include dependency graph for BNO08x_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros

#define | CHECK_TASKS_RUNNING(evt_grp_task_flow, running_bit) ((xEventGroupGetBits(evt_grp_task_flow) & (running_bit)) != 0)
| Clears the most significant byte of a 16-bit value.
#define | UINT16_CLR_MSB(val_16bit) ((val_16bit) & 0x00FFU)
| Clears the most significant byte of a 16-bit value.
#define | UINT16_CLR_LSB(val_16bit) ((val_16bit) & 0xFF00U)
| Clears the least significant byte of a 16-bit value.
#define | UINT32_CLR_BYTE(val_32bit, byte2clear) ((val_32bit) & ~(0xFFUL << (byte2clear * 8UL)))
| Clears a specified byte in a 32-bit value.
#define | UINT32_MSK_BYTE(val_32bit, byte2mask) ((val_32bit) & (0xFFUL << (byte2mask * 8UL)))
| Masks a specified byte in a 32-bit value.
#define | PARSE_PACKET_LENGTH(packet_ptr) (UINT16_CLR_LSB(static_cast<uint16_t>(packet_ptr->header[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_ptr->header[0])))
| Parse length from SHTP packet header.
#define | PARSE_PACKET_TIMESTAMP(packet_ptr)
| Parse timestamp from SHTP packet.
#define | PARSE_PRODUCT_ID_REPORT_RESET_REASON(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[1]), 0UL)
| Parse reset reason from SHTP packet containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_SW_PART_NO(packet_ptr)
| Parse sw part number from SHTP packet containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_SW_BUILD_NO(packet_ptr)
| Parse sw build number from SHTP packet containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_PATCH(packet_ptr) (UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[13]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[12]), 0UL))
| Parse sw version patch from SHTP packet containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_PRODUCT_ID(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[0]), 0UL)
| Parse product ID SHTP packet containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_MAJOR(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[2]), 0UL)
| Parse product sw version major containing product ID report.
#define | PARSE_PRODUCT_ID_REPORT_SW_VERSION_MINOR(packet_ptr) UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[3]), 0UL)
| Parse product sw version minor containing product ID report.
#define | PARSE_GYRO_REPORT_RAW_QUAT_I(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[0])))
| Parse quat I data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_QUAT_J(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[3]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[2])))
| Parse quat J data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_QUAT_K(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[4])))
| Parse quat K data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_QUAT_REAL(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[6])))
| Parse quat real data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_X(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[8])))
| Parse x axis velocity data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_Y(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[10])))
| Parse y axis velocity data from integrated gyro rotation vector report.
#define | PARSE_GYRO_REPORT_RAW_GYRO_VEL_Z(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[12])))
| Parse z axis velocity data from integrated gyro rotation vector report.
#define | PARSE_INPUT_REPORT_STATUS_BITS(packet) (packet->body[5 + 2] & 0x03U)
| Parse status bits from input report.
#define | PARSE_INPUT_REPORT_REPORT_ID(packet) UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5]))
| Parse report ID from input report.
#define | PARSE_INPUT_REPORT_DATA_1(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 4])))
| Parse first data block from input report.
#define | PARSE_INPUT_REPORT_DATA_2(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 6])))
| Parse second data block from input report.
#define | PARSE_INPUT_REPORT_DATA_3(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 8])))
| Parse third data block from input report.
#define | PARSE_INPUT_REPORT_DATA_4(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 10])))
| Parse fourth data block from input report.
#define | PARSE_INPUT_REPORT_DATA_5(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 12])))
| Parse fifth data block from input report.
#define | PARSE_INPUT_REPORT_DATA_6(packet) (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 15]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 14])))
| Parse sixth data block from input report.
#define | IS_ROTATION_VECTOR_REPORT(packet)
| Checks if packet containing input report is a rotation vector report.
#define | PARSE_FRS_READ_RESPONSE_REPORT_RECORD_ID(packet_body) (UINT16_CLR_LSB(static_cast<uint16_t>(packet_body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_body[12])))
| Parse FRS record ID from FRS read response report.
#define | PARSE_FRS_READ_RESPONSE_REPORT_DATA_1(packet_body)
| Parse data block 1 from FRS read response report.
#define | PARSE_FRS_READ_RESPONSE_REPORT_DATA_2(packet_body)
| Parse data block 2 from FRS read response report.

## Detailed Description

Author
  Myles Parfeniuk

## Macro Definition Documentation

## CHECK_TASKS_RUNNING

#define CHECK_TASKS_RUNNING | ( |  | evt_grp_task_flow,
|  |  | running_bit ) ((xEventGroupGetBits(evt_grp_task_flow) & (running_bit)) != 0)

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

Parameters

  evt_grp_task_flow | Task flow event group handle.
  running_bit | EVT_GRP_TSK_FLW_RUNNING_BIT

Returns
  The value with the MSB cleared.

## IS_ROTATION_VECTOR_REPORT

#define IS_ROTATION_VECTOR_REPORT | ( |  | packet | ) |

Value:
((packet)->body[5] == SENSOR_REPORT_ID_ROTATION_VECTOR || (packet)->body[5] == SENSOR_REPORT_ID_GAME_ROTATION_VECTOR || \
(packet)->body[5] == SENSOR_REPORT_ID_ARVR_STABILIZED_ROTATION_VECTOR || \
(packet)->body[5] == SENSOR_REPORT_ID_ARVR_STABILIZED_GAME_ROTATION_VECTOR)

Checks if packet containing input report is a rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  True if contained input report is rotation vector report.

## PARSE_FRS_READ_RESPONSE_REPORT_DATA_1

#define PARSE_FRS_READ_RESPONSE_REPORT_DATA_1 | ( |  | packet_body | ) |

Value:
(UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[7]) << 24UL, 3UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[6]) << 16UL, 2UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[5]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[4]), 0UL))
UINT32_MSK_BYTE
#define UINT32_MSK_BYTE(val_32bit, byte2mask)
Masks a specified byte in a 32-bit value.
Definition BNO08x_macros.hpp:58

Parse data block 1 from FRS read response report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  FRS read response data block 1.

## PARSE_FRS_READ_RESPONSE_REPORT_DATA_2

#define PARSE_FRS_READ_RESPONSE_REPORT_DATA_2 | ( |  | packet_body | ) |

Value:
(UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[11]) << 24UL, 3UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[10]) << 16UL, 2UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[9]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet_body[8]), 0UL))

Parse data block 2 from FRS read response report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  FRS read response data block 2.

## PARSE_FRS_READ_RESPONSE_REPORT_RECORD_ID

#define PARSE_FRS_READ_RESPONSE_REPORT_RECORD_ID | ( |  | packet_body | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet_body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet_body[12])))

Parse FRS record ID from FRS read response report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  FRS record ID.

## PARSE_GYRO_REPORT_RAW_GYRO_VEL_X

#define PARSE_GYRO_REPORT_RAW_GYRO_VEL_X | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[8])))

Parse x axis velocity data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  x velocity data.

## PARSE_GYRO_REPORT_RAW_GYRO_VEL_Y

#define PARSE_GYRO_REPORT_RAW_GYRO_VEL_Y | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[10])))

Parse y axis velocity data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  y velocity data.

## PARSE_GYRO_REPORT_RAW_GYRO_VEL_Z

#define PARSE_GYRO_REPORT_RAW_GYRO_VEL_Z | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[12])))

Parse z axis velocity data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  z velocity data.

## PARSE_GYRO_REPORT_RAW_QUAT_I

#define PARSE_GYRO_REPORT_RAW_QUAT_I | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[1]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[0])))

Parse quat I data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Quat I data.

## PARSE_GYRO_REPORT_RAW_QUAT_J

#define PARSE_GYRO_REPORT_RAW_QUAT_J | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[3]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[2])))

Parse quat J data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Quat J data.

## PARSE_GYRO_REPORT_RAW_QUAT_K

#define PARSE_GYRO_REPORT_RAW_QUAT_K | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[4])))

Parse quat K data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Quat K data.

## PARSE_GYRO_REPORT_RAW_QUAT_REAL

#define PARSE_GYRO_REPORT_RAW_QUAT_REAL | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[6])))

Parse quat real data from integrated gyro rotation vector report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Quat real data.

## PARSE_INPUT_REPORT_DATA_1

#define PARSE_INPUT_REPORT_DATA_1 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 5]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 4])))

Parse first data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  First data block of input report.

## PARSE_INPUT_REPORT_DATA_2

#define PARSE_INPUT_REPORT_DATA_2 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 7]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 6])))

Parse second data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Second data block of input report.

## PARSE_INPUT_REPORT_DATA_3

#define PARSE_INPUT_REPORT_DATA_3 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 9]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 8])))

Parse third data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  third data block of input report.

## PARSE_INPUT_REPORT_DATA_4

#define PARSE_INPUT_REPORT_DATA_4 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 11]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 10])))

Parse fourth data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  fourth data block of input report.

## PARSE_INPUT_REPORT_DATA_5

#define PARSE_INPUT_REPORT_DATA_5 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 13]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 12])))

Parse fifth data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  fifth data block of input report.

## PARSE_INPUT_REPORT_DATA_6

#define PARSE_INPUT_REPORT_DATA_6 | ( |  | packet | ) | (UINT16_CLR_LSB(static_cast<uint16_t>(packet->body[5 + 15]) << 8U) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5 + 14])))

Parse sixth data block from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sixth data block of input report.

## PARSE_INPUT_REPORT_REPORT_ID

#define PARSE_INPUT_REPORT_REPORT_ID | ( |  | packet | ) | UINT16_CLR_MSB(static_cast<uint16_t>(packet->body[5]))

Parse report ID from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Report ID.

## PARSE_INPUT_REPORT_STATUS_BITS

#define PARSE_INPUT_REPORT_STATUS_BITS | ( |  | packet | ) | (packet->body[5 + 2] & 0x03U)

Parse status bits from input report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Input report status bits.

## PARSE_PACKET_LENGTH

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

Parse length from SHTP packet header.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Length of SHTP packet.

## PARSE_PACKET_TIMESTAMP

#define PARSE_PACKET_TIMESTAMP | ( |  | packet_ptr | ) |

Value:
(UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[4]) << 24UL, 3UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[3]) << 16UL, 2UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[2]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[1]), 0UL))

Parse timestamp from SHTP packet.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Packet timestamp.

## PARSE_PRODUCT_ID_REPORT_PRODUCT_ID

#define PARSE_PRODUCT_ID_REPORT_PRODUCT_ID | ( |  | packet_ptr | ) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[0]), 0UL)

Parse product ID SHTP packet containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Product ID.

## PARSE_PRODUCT_ID_REPORT_RESET_REASON

#define PARSE_PRODUCT_ID_REPORT_RESET_REASON | ( |  | packet_ptr | ) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[1]), 0UL)

Parse reset reason from SHTP packet containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  Reset reason.

## PARSE_PRODUCT_ID_REPORT_SW_BUILD_NO

#define PARSE_PRODUCT_ID_REPORT_SW_BUILD_NO | ( |  | packet_ptr | ) |

Value:
UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[11]) << 24UL, 3UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[10]) << 16UL, 2UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[9]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[8]), 0UL)

Parse sw build number from SHTP packet containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sw build number.

## PARSE_PRODUCT_ID_REPORT_SW_PART_NO

#define PARSE_PRODUCT_ID_REPORT_SW_PART_NO | ( |  | packet_ptr | ) |

Value:
(UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[7]) << 24UL, 3UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[6]) << 16UL, 2UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[5]) << 8UL, 1UL) | \
UINT32_MSK_BYTE(static_cast<uint32_t>(packet_ptr->body[4]), 0UL))

Parse sw part number from SHTP packet containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sw part number.

## PARSE_PRODUCT_ID_REPORT_SW_VERSION_MAJOR

#define PARSE_PRODUCT_ID_REPORT_SW_VERSION_MAJOR | ( |  | packet_ptr | ) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[2]), 0UL)

Parse product sw version major containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sw version major.

## PARSE_PRODUCT_ID_REPORT_SW_VERSION_MINOR

#define PARSE_PRODUCT_ID_REPORT_SW_VERSION_MINOR | ( |  | packet_ptr | ) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[3]), 0UL)

Parse product sw version minor containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sw version minor.

## PARSE_PRODUCT_ID_REPORT_SW_VERSION_PATCH

#define PARSE_PRODUCT_ID_REPORT_SW_VERSION_PATCH | ( |  | packet_ptr | ) | (UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[13]) << 8UL, 1UL) | UINT32_MSK_BYTE(static_cast<uint32_t>(packet->body[12]), 0UL))

Parse sw version patch from SHTP packet containing product ID report.

Parameters

  packet | Pointer to bno08x_rx_packet_t containing data.

Returns
  sw version patch.

## 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.