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.h | |
| parent | c0eeae6901572be2469ab61620c39cd2d3b2cb58 (diff) | |
finish merge
Diffstat (limited to 'shared/util.h')
| -rw-r--r-- | shared/util.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/shared/util.h b/shared/util.h index 1bee487..8cb54c1 100644 --- a/shared/util.h +++ b/shared/util.h @@ -8,6 +8,10 @@ /** @brief take the log base 16 of `x` */ unsigned int ws_log16(unsigned int x); +#ifdef __cplusplus +extern "C" { +#endif + /** @brief convert 16-bit temperature value to uint8_t */ uint8_t ws_sensor_tmp_to_8(uint16_t temperature); /** @brief convert 16-bit humidity value to uint8_t */ @@ -21,3 +25,8 @@ float ws_sensor_tmp_to_f(uint8_t temperature); float ws_sensor_hum_to_f(uint8_t humidity); /** @brief convert 8-bit atmospheric pressure value back to float */ float ws_sensor_atm_to_f(uint8_t atmospheric_pressure); + +#ifdef __cplusplus +} +#endif + |