drivers: stepper: fix stepper_set_event_callback c prototype and definition

This commit fixes incorrect c prototype and defintion of
stepper_set_callback to stepper_set_event_callback

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
Jilay Pandya 2024-11-05 21:09:16 +01:00 committed by Anas Nashif
commit 195c2c1360
4 changed files with 13 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright 2024 Jilay Sandeep Pandya
* SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -17,7 +17,7 @@ struct k_poll_event stepper_event;
void *user_data_received;
static void stepper_print_event_callback(const struct device *dev, enum stepper_event event,
void *user_data)
void *user_data)
{
user_data_received = user_data;
switch (event) {
@ -85,7 +85,7 @@ ZTEST_F(stepper, test_target_position)
(void)stepper_set_max_velocity(fixture->dev, 100u);
/* Pass the function name as user data */
(void)stepper_set_callback(fixture->dev, fixture->callback, &fixture);
(void)stepper_set_event_callback(fixture->dev, fixture->callback, &fixture);
(void)stepper_set_target_position(fixture->dev, pos);