drivers: adc: use adc_read_dt api
Where struct adc_dt_spec is in use use adc_read_dt(). Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
451568c645
commit
ead0c4f865
7 changed files with 14 additions and 14 deletions
|
@ -28,7 +28,7 @@ static int fetch(const struct device *dev, enum sensor_channel chan)
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
ret = adc_read(config->port.dev, &data->sequence);
|
||||
ret = adc_read_dt(&config->port, &data->sequence);
|
||||
if (ret != 0) {
|
||||
LOG_ERR("adc_read: %d", ret);
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ static int fetch(const struct device *dev, enum sensor_channel chan)
|
|||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
ret = adc_read(config->adc.dev, &data->sequence);
|
||||
ret = adc_read_dt(&config->adc, &data->sequence);
|
||||
if (ret != 0) {
|
||||
LOG_ERR("adc_read: %d", ret);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue