Firmware
Functions
conversions.h File Reference

Definition of commonly used conversions. More...

#include <float.h>
#include <stdint.h>

Go to the source code of this file.

Functions

__BEGIN_DECLS __EXPORT int16_t int16_t_from_bytes (uint8_t bytes[])
 Converts a signed 16 bit integer from big endian to little endian. More...
 

Detailed Description

Definition of commonly used conversions.

Includes bit / byte / geo representation and unit conversions.

Function Documentation

§ int16_t_from_bytes()

__BEGIN_DECLS __EXPORT int16_t int16_t_from_bytes ( uint8_t  bytes[])

Converts a signed 16 bit integer from big endian to little endian.

This function is for commonly used 16 bit big endian sensor data, delivered by driver routines as two 8 bit numbers in big endian order. Common vendors with big endian representation are Invense, Bosch and Honeywell. ST micro devices tend to use a little endian representation.