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:
parent
61e3267415
commit
3cbc0352ea
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user