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:
Jilay Pandya 2024-10-19 14:53:00 +02:00 committed by Anas Nashif
commit 271aeaf5f9
6 changed files with 29 additions and 15 deletions

View file

@ -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)