Microchip® Advanced Software Framework

bma_axis10_t Union Reference

Bosch 10-bit Axis Data Format.

The BMA020, BMA150, and BMA250 store 2's-complement 10-bit axis data samples split across two contiguous 8-bit device locations where the lower address in the device register space stores a 1-bit "new data" flag and the next higher locations store the 10 most significant bits of the axis data.

#include <bma_axis.inc.h>

Data Fields

struct {
   uint16_t   acc_lsb: 2
 
   int16_t   acc_msb: 8
 
   uint16_t   new_data: 1
 
   uint16_t   unused: 5
 
field
 
int16_t word
 

uint16_t bma_axis10_t::acc_lsb

Referenced by bma_axis10_val().

int16_t bma_axis10_t::acc_msb

Referenced by bma_axis10_val().

struct { ... } bma_axis10_t::field

Referenced by bma_axis10_val().

uint16_t bma_axis10_t::new_data
uint16_t bma_axis10_t::unused
int16_t bma_axis10_t::word

Referenced by bma_axis10_val().