diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-30 20:33:41 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-30 20:33:41 +0100 |
commit | ea9463c3ba9335bc3d04dd04502ab9e67e8a718c (patch) | |
tree | de55f4b03eba50533f6dd220c31d50fa4239d94a /shared/util.c | |
parent | c0eeae6901572be2469ab61620c39cd2d3b2cb58 (diff) |
finish merge
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 + |