drivers/mma8x5x: correct cast of phydat_t*
The read functions have a mma8x5x_data_t* argument which is a struct with 3 int16_t members. Thus we should cast res->val instead of just res.
This commit is contained in:
parent
ab17629b97
commit
cf560eaca7
@ -27,7 +27,7 @@
|
||||
|
||||
static int read_acc(const void *dev, phydat_t *res)
|
||||
{
|
||||
mma8x5x_read((const mma8x5x_t *)dev, (mma8x5x_data_t *)res);
|
||||
mma8x5x_read((const mma8x5x_t *)dev, (mma8x5x_data_t *)res->val);
|
||||
|
||||
res->unit = UNIT_G;
|
||||
res->scale = -3;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user