1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/jc42 fix temperature parameter signedness

This commit is contained in:
Koen Zandberg 2017-01-13 20:28:58 +01:00
parent ad874fb694
commit 03d0f138b4
3 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ int jc42_set_config(jc42_t* dev, uint16_t data);
* @return 0 on success
* @return -1 on error
*/
int jc42_get_temperature(jc42_t* dev, uint16_t* temperature);
int jc42_get_temperature(jc42_t* dev, int16_t* temperature);
#ifdef __cplusplus
}

View File

@ -63,7 +63,7 @@ int jc42_set_config(jc42_t* dev, uint16_t data)
return jc42_set_register(dev, JC42_REG_CONFIG, &data);
}
int jc42_get_temperature(jc42_t* dev, uint16_t* temperature)
int jc42_get_temperature(jc42_t* dev, int16_t* temperature)
{
struct { signed int x:12;} s;
uint16_t tmp;

View File

@ -27,7 +27,7 @@
static int read_temperature(void *dev, phydat_t *res)
{
uint16_t temperature;
int16_t temperature;
jc42_t *d = (jc42_t *)dev;
jc42_get_temperature(d, &temperature);