refactor(app): replace driver_data with data
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
This commit is contained in:
parent
33c959d031
commit
1411092a7b
9 changed files with 45 additions and 45 deletions
|
|
@ -19,7 +19,7 @@
|
|||
LOG_MODULE_REGISTER(EC11, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static int ec11_get_ab_state(struct device *dev) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
struct ec11_data *drv_data = dev->data;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
|
||||
return (gpio_pin_get(drv_data->a, drv_cfg->a_pin) << 1) |
|
||||
|
|
@ -27,7 +27,7 @@ static int ec11_get_ab_state(struct device *dev) {
|
|||
}
|
||||
|
||||
static int ec11_sample_fetch(struct device *dev, enum sensor_channel chan) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
struct ec11_data *drv_data = dev->data;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
uint8_t val;
|
||||
int8_t delta;
|
||||
|
|
@ -70,7 +70,7 @@ static int ec11_sample_fetch(struct device *dev, enum sensor_channel chan) {
|
|||
|
||||
static int ec11_channel_get(struct device *dev, enum sensor_channel chan,
|
||||
struct sensor_value *val) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
struct ec11_data *drv_data = dev->data;
|
||||
|
||||
if (chan != SENSOR_CHAN_ROTATION) {
|
||||
return -ENOTSUP;
|
||||
|
|
@ -91,7 +91,7 @@ static const struct sensor_driver_api ec11_driver_api = {
|
|||
};
|
||||
|
||||
int ec11_init(struct device *dev) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
struct ec11_data *drv_data = dev->data;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
|
||||
LOG_DBG("A: %s %d B: %s %d resolution %d", drv_cfg->a_label, drv_cfg->a_pin, drv_cfg->b_label,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue