ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
rd_sensor_data_fields_t Union Reference

Union to access sensor data. More...

#include <ruuvi_driver_sensor.h>

Data Fields

uint32_t bitfield
 Bitfield used to access sensor data. More...
 
rd_sensor_data_bitfield_t datas
 Structured data field. More...
 

Detailed Description

Union to access sensor data.

MISRA deviation: Use of union. Union is used here for fast operations on sensor data through field bitfield and to give a meaningful value to each bit through datas.

C99 and onwards allow type punning, but this is not portable to C++. Run the integration tests on your platform.

Definition at line 201 of file ruuvi_driver_sensor.h.

Field Documentation

◆ bitfield

uint32_t bitfield

Bitfield used to access sensor data.

Definition at line 203 of file ruuvi_driver_sensor.h.

◆ datas

Structured data field.

Definition at line 204 of file ruuvi_driver_sensor.h.


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