PX4 Firmware
PX4 Autopilot Software http://px4.io
conversions.c File Reference

Implementation of commonly used conversions. More...

#include <px4_platform_common/px4_config.h>
#include <float.h>
#include "conversions.h"
Include dependency graph for conversions.c:

Go to the source code of this file.

Functions

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

Detailed Description

Implementation of commonly used conversions.

Definition in file conversions.c.

Function Documentation

◆ int16_t_from_bytes()

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.

Definition at line 46 of file conversions.c.

Referenced by MPU6000::factory_self_test(), MPU9250::measure(), MPU6000::measure(), and ICM20948::measure().

Here is the caller graph for this function: