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:
parent
ad874fb694
commit
03d0f138b4
@ -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
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user