drivers: stepper: Place API into iterable section
Add wrapper DEVICE_API macro to all stepper_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
80537d9b85
commit
c0adf726ff
3 changed files with 3 additions and 3 deletions
|
@ -721,7 +721,7 @@ static int tmc5041_stepper_init(const struct device *dev)
|
|||
.stepper = DEVICE_DT_GET(child),};
|
||||
|
||||
#define TMC5041_STEPPER_API_DEFINE(child) \
|
||||
static const struct stepper_driver_api tmc5041_stepper_api_##child = { \
|
||||
static DEVICE_API(stepper, tmc5041_stepper_api_##child) = { \
|
||||
.enable = tmc5041_stepper_enable, \
|
||||
.is_moving = tmc5041_stepper_is_moving, \
|
||||
.move = tmc5041_stepper_move, \
|
||||
|
|
|
@ -124,7 +124,7 @@ static int fake_stepper_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct stepper_driver_api fake_stepper_driver_api = {
|
||||
static DEVICE_API(stepper, fake_stepper_driver_api) = {
|
||||
.enable = fake_stepper_enable,
|
||||
.move = fake_stepper_move,
|
||||
.is_moving = fake_stepper_is_moving,
|
||||
|
|
|
@ -352,7 +352,7 @@ static int gpio_stepper_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct stepper_driver_api gpio_stepper_api = {
|
||||
static DEVICE_API(stepper, gpio_stepper_api) = {
|
||||
.enable = gpio_stepper_enable,
|
||||
.move = gpio_stepper_move,
|
||||
.is_moving = gpio_stepper_is_moving,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue