Skip to content

Use DEVICE_API macro to initialize FSW's sensors #284

@cowsed

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions