Hospital Analyser  1.0
ble_data_util.h
Go to the documentation of this file.
1 #ifndef BLE_DATA_UTIL_H
2 #define BLE_DATA_UTIL_H
3 
4 #include "stdint.h"
5 
13 int16_t FloatToInteger(float sensorValue);
14 
20 int16_t FloatToInteger_1Decimal(float sensorValue);
21 
27 int16_t FloatToInteger_2Decimal(float sensorValue);
28 
32 #define STORE_LE_16(buf, val) ( ((buf)[0] = (uint8_t) (val) ) , \
33  ((buf)[1] = (uint8_t) (val>>8) ) )
34 
35 #endif // BLE_DATA_UTIL_H
int16_t FloatToInteger_1Decimal(float sensorValue)
FloatToInteger_1Decimal Converts 4 byte Float to 2 byte Integer, with one decimal place precision...
int16_t FloatToInteger(float sensorValue)
FloatToInteger Converts 4 byte Float to 2 byte Integer.
int16_t FloatToInteger_2Decimal(float sensorValue)
FloatToInteger_2Decimal Converts 4 byte Float to 2 byte Integer, whit two decimal place precision...