1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

drivers: use saul_notsup

This commit is contained in:
Hauke Petersen 2017-05-08 13:56:35 +02:00
parent 61e3267415
commit 3cbc0352ea
6 changed files with 7 additions and 39 deletions

View File

@ -31,13 +31,8 @@ static int read_acc(void *dev, phydat_t *res)
return 3;
}
static int write(void *dev, phydat_t *state)
{
return -ENOTSUP;
}
const saul_driver_t adxl345_saul_driver = {
.read = read_acc,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_ACCEL,
};

View File

@ -33,13 +33,8 @@ static int read(void *dev, phydat_t *res)
return 1;
}
static int write(void *dev, phydat_t *state)
{
return -ENOTSUP;
}
const saul_driver_t isl29020_saul_driver = {
.read = read,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_LIGHT,
};

View File

@ -32,13 +32,8 @@ static int read(void *dev, phydat_t *res)
return 3;
}
static int write(void *dev, phydat_t *state)
{
return -ENOTSUP;
}
const saul_driver_t l3g4200d_saul_driver = {
.read = read,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_GYRO,
};

View File

@ -45,15 +45,8 @@ static int read_acc(void *dev, phydat_t *res)
return 3;
}
static int write(void *dev, phydat_t *state)
{
(void) dev;
(void) state;
return -ENOTSUP;
}
const saul_driver_t lis3dh_saul_driver = {
.read = read_acc,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_ACCEL,
};

View File

@ -33,13 +33,8 @@ static int read(void *dev, phydat_t *res)
return 1;
}
static int write(void *dev, phydat_t *state)
{
return -ENOTSUP;
}
const saul_driver_t lps331ap_saul_driver = {
.read = read,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_PRESS,
};

View File

@ -67,19 +67,14 @@ static int read_mag(void *dev, phydat_t *res)
return 3;
}
static int write(void *dev, phydat_t *state)
{
return -ENOTSUP;
}
const saul_driver_t lsm303dlhc_saul_acc_driver = {
.read = read_acc,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_ACCEL,
};
const saul_driver_t lsm303dlhc_saul_mag_driver = {
.read = read_mag,
.write = write,
.write = saul_notsup,
.type = SAUL_SENSE_MAG,
};