diff options
Diffstat (limited to 'shared/util.c')
-rw-r--r-- | shared/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/util.c b/shared/util.c index 648631a..94f2273 100644 --- a/shared/util.c +++ b/shared/util.c @@ -6,6 +6,10 @@ unsigned int ws_log16(unsigned int x) { return l; } +#ifdef __cplusplus +extern "C" { +#endif + uint8_t ws_sensor_tmp_to_8(uint16_t temperature) { return temperature / 256; } @@ -29,3 +33,8 @@ float ws_sensor_hum_to_f(uint8_t humidity) { float ws_sensor_atm_to_f(uint8_t atmospheric_pressure) { return ((20.0 * atmospheric_pressure) / 256.0) + 990.0; // datasheet no? } + +#ifdef __cplusplus +} +#endif + |