drivers: stepper: change gpio-stepper dt-compatible

This commit changes compatible of gpio-stepper in driver

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
This commit is contained in:
Jilay Pandya 2024-11-05 21:05:54 +01:00 committed by Anas Nashif
commit 843625a29b
13 changed files with 73 additions and 104 deletions

View file

@ -1,10 +1,8 @@
# Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(stepper_api)
target_sources(app PRIVATE
src/main.c
)
target_sources(app PRIVATE src/main.c)

View file

@ -1,4 +1,4 @@
# Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-License-Identifier: Apache-2.0
CONFIG_GPIO=y

View file

@ -4,15 +4,13 @@
*/
/ {
uln2003_motor: uln2003_1 {
compatible = "zephyr,gpio-steppers";
motor_1: motor_1 {
compatible = "zephyr,gpio-stepper";
status = "okay";
motor_1: motor_1 {
micro-step-res = <1>;
gpios = <&gpioa 9 GPIO_ACTIVE_HIGH>,
<&gpioc 7 GPIO_ACTIVE_HIGH>,
<&gpiob 0 GPIO_ACTIVE_HIGH>,
<&gpioa 7 GPIO_ACTIVE_HIGH>;
};
micro-step-res = <1>;
gpios = <&gpioa 9 GPIO_ACTIVE_HIGH>,
<&gpioc 7 GPIO_ACTIVE_HIGH>,
<&gpiob 0 GPIO_ACTIVE_HIGH>,
<&gpioa 7 GPIO_ACTIVE_HIGH>;
};
};

View file

@ -1,4 +1,4 @@
# Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-License-Identifier: Apache-2.0
CONFIG_GPIO=y

View file

@ -19,16 +19,13 @@
};
/ {
test_uln2003_motor_cluster: uln2003_motor_cluster {
compatible = "zephyr,gpio-steppers";
motor_1: motor_1 {
compatible = "zephyr,gpio-stepper";
status = "okay";
motor_1: motor_1 {
micro-step-res = <1>;
gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
};
micro-step-res = <1>;
gpios = <&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>,
<&test_gpio 0 0>;
};
};

View file

@ -1,4 +1,4 @@
# Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-License-Identifier: Apache-2.0
CONFIG_ZTEST=y

View file

@ -1,4 +1,4 @@
# Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-FileCopyrightText: Copyright (c) 2024 Jilay Sandeep Pandya
# SPDX-License-Identifier: Apache-2.0
tests: