Hospital Analyser  1.0
Macros | Functions
ble_data_util.h File Reference
#include "stdint.h"
Include dependency graph for ble_data_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STORE_LE_16(buf, val)
 Macro for storing 2 byte int16_t into uint8_t array. More...
 

Functions

int16_t FloatToInteger (float sensorValue)
 FloatToInteger Converts 4 byte Float to 2 byte Integer. More...
 
int16_t FloatToInteger_1Decimal (float sensorValue)
 FloatToInteger_1Decimal Converts 4 byte Float to 2 byte Integer, with one decimal place precision. More...
 
int16_t FloatToInteger_2Decimal (float sensorValue)
 FloatToInteger_2Decimal Converts 4 byte Float to 2 byte Integer, whit two decimal place precision. More...
 

Macro Definition Documentation

#define STORE_LE_16 (   buf,
  val 
)
Value:
( ((buf)[0] = (uint8_t) (val) ) , \
((buf)[1] = (uint8_t) (val>>8) ) )

Macro for storing 2 byte int16_t into uint8_t array.

Function Documentation

int16_t FloatToInteger ( float  sensorValue)

FloatToInteger Converts 4 byte Float to 2 byte Integer.

Parameters
sensorValueValue to be converted
Returns
Converted integer value
int16_t FloatToInteger_1Decimal ( float  sensorValue)

FloatToInteger_1Decimal Converts 4 byte Float to 2 byte Integer, with one decimal place precision.

Parameters
sensorValueValue to be converted
Returns
Converted integer value
int16_t FloatToInteger_2Decimal ( float  sensorValue)

FloatToInteger_2Decimal Converts 4 byte Float to 2 byte Integer, whit two decimal place precision.

Parameters
sensorValueValue to be converted
Returns
Converted integer value