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

drivers/mm7660: correct cast of phydat_t*

The read functions have a mma7660_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:
Kees Bakker 2019-01-06 17:55:47 +01:00
parent 37d8709f3f
commit 0ee426b4fe

View File

@ -26,7 +26,7 @@
static int read_acc(const void *dev, phydat_t *res)
{
mma7660_read((const mma7660_t *)dev, (mma7660_data_t *)res);
mma7660_read((const mma7660_t *)dev, (mma7660_data_t *)res->val);
res->unit = UNIT_G;
res->scale = -3;