Skip to content

Commit

Permalink
drivers: sensor: Use DEVICE_API
Browse files Browse the repository at this point in the history
Demonstrate DEVICE_API usage for sensor_driver_api.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt committed Nov 21, 2024
1 parent 3af081a commit f582dd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/sensor/example_sensor/example_sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static int example_sensor_channel_get(const struct device *dev,
return 0;
}

static const struct sensor_driver_api example_sensor_api = {
static DEVICE_API(sensor, example_sensor_api) = {
.sample_fetch = &example_sensor_sample_fetch,
.channel_get = &example_sensor_channel_get,
};
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ manifest:
projects:
- name: zephyr
remote: zephyrproject-rtos
revision: main
revision: pull/72293/head
import:
# By using name-allowlist we can clone only the modules that are
# strictly needed by the application.
Expand Down

0 comments on commit f582dd1

Please sign in to comment.