tests: drivers: stepper: stepper_api: test cb user_data
This commit does the following: 1. tests set_callback and user_data 2. fixes the api as well as the drivers by passing user_data back to the set callback Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
parent
fdae4d2e4f
commit
271aeaf5f9
6 changed files with 29 additions and 15 deletions
|
@ -185,7 +185,7 @@ static void execute_callback(const struct device *dev, const enum stepper_event
|
|||
LOG_WRN_ONCE("No callback registered");
|
||||
return;
|
||||
}
|
||||
data->callback(dev, event);
|
||||
data->callback(dev, event, data->event_cb_user_data);
|
||||
}
|
||||
|
||||
static void rampstat_work_handler(struct k_work *work)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue