forked from kofal.net/zmk
refactor(app): replace config_info with config
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
This commit is contained in:
@@ -57,7 +57,7 @@ static uint8_t lithium_ion_mv_to_pct(int16_t bat_mv) {
|
||||
|
||||
static int bvd_sample_fetch(struct device *dev, enum sensor_channel chan) {
|
||||
struct bvd_data *drv_data = dev->driver_data;
|
||||
const struct bvd_config *drv_cfg = dev->config_info;
|
||||
const struct bvd_config *drv_cfg = dev->config;
|
||||
struct adc_sequence *as = &drv_data->as;
|
||||
|
||||
// Make sure selected channel is supported
|
||||
@@ -141,7 +141,7 @@ static const struct sensor_driver_api bvd_api = {
|
||||
|
||||
static int bvd_init(struct device *dev) {
|
||||
struct bvd_data *drv_data = dev->driver_data;
|
||||
const struct bvd_config *drv_cfg = dev->config_info;
|
||||
const struct bvd_config *drv_cfg = dev->config;
|
||||
|
||||
drv_data->adc = device_get_binding(drv_cfg->io_channel.label);
|
||||
|
||||
|
||||
@@ -20,7 +20,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;
|
||||
const struct ec11_config *drv_cfg = dev->config_info;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
|
||||
return (gpio_pin_get(drv_data->a, drv_cfg->a_pin) << 1) |
|
||||
gpio_pin_get(drv_data->b, drv_cfg->b_pin);
|
||||
@@ -28,7 +28,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;
|
||||
const struct ec11_config *drv_cfg = dev->config_info;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
uint8_t val;
|
||||
int8_t delta;
|
||||
|
||||
@@ -92,7 +92,7 @@ static const struct sensor_driver_api ec11_driver_api = {
|
||||
|
||||
int ec11_init(struct device *dev) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
const struct ec11_config *drv_cfg = dev->config_info;
|
||||
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,
|
||||
drv_cfg->b_pin, drv_cfg->resolution);
|
||||
|
||||
@@ -21,7 +21,7 @@ LOG_MODULE_DECLARE(EC11, CONFIG_SENSOR_LOG_LEVEL);
|
||||
|
||||
static inline void setup_int(struct device *dev, bool enable) {
|
||||
struct ec11_data *data = dev->driver_data;
|
||||
const struct ec11_config *cfg = dev->config_info;
|
||||
const struct ec11_config *cfg = dev->config;
|
||||
|
||||
LOG_DBG("enabled %s", (enable ? "true" : "false"));
|
||||
|
||||
@@ -115,7 +115,7 @@ int ec11_trigger_set(struct device *dev, const struct sensor_trigger *trig,
|
||||
|
||||
int ec11_init_interrupt(struct device *dev) {
|
||||
struct ec11_data *drv_data = dev->driver_data;
|
||||
const struct ec11_config *drv_cfg = dev->config_info;
|
||||
const struct ec11_config *drv_cfg = dev->config;
|
||||
|
||||
drv_data->dev = dev;
|
||||
/* setup gpio interrupt */
|
||||
|
||||
Reference in New Issue
Block a user