Skip to content

Use DEVICE_API macro to initialize FSW's sensors #284

Description

@cowsed

Is your feature request related to a problem? Please describe.
The zephyr sensor shell is really helpful for board bring up and general debugging. To let the sensor shell know that you have a sensor declared somewhere, zephyr uses the DEVICE_API macro.

Describe the solution you'd like
replace instances of
static const struct sensor_driver_api YOURNAMEHERE_api = { ... };
with
static DEVICE_API(sensor, bmp388_api) = { ... };
in our drivers/ folder.

This interfaces with zephyrs iterable sections system and allows the sensor shell to know about the device.

Additional context
https://docs.zephyrproject.org/latest/kernel/iterable_sections/index.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions