Commit 179f990e authored by Jilay Pandya's avatar Jilay Pandya Committed by Carles Cufi
Browse files

tests: drivers: stepper: build all



This commit introduces preliminary build all test for stepper driver

Signed-off-by: default avatarJilay Pandya <jilay.pandya@zeiss.com>
parent 32390d55
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
# SPDX-FileCopyrightText: Copyright (c) 2023 Carl Zeiss Meditec AG
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all)

target_sources(app PRIVATE src/main.c)
+21 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2023 Carl Zeiss Meditec AG
 * SPDX-License-Identifier: Apache-2.0
 */

/ {
	test {
		#address-cells = <1>;
		#size-cells = <1>;

		test_gpio: gpio@deadbeef {
			compatible = "vnd,gpio";
			gpio-controller;
			reg = <0xdeadbeef 0x1000>;
			#gpio-cells = <0x2>;
			status = "okay";

			#include "gpio.dtsi"
		};
	};
};
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2023 Carl Zeiss Meditec AG
 * SPDX-License-Identifier: Apache-2.0
 */

test_uln2003_motor_cluster: uln2003_motor_cluster {
	compatible = "gpio-steppers";
	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>;
	};
	motor_2: motor_2 {
		micro-step-res = <2>;
		gpios = <&test_gpio 0 0>,
			<&test_gpio 0 0>,
			<&test_gpio 0 0>,
			<&test_gpio 0 0>;
	};
};
+7 −0
Original line number Diff line number Diff line
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_LOG=y
CONFIG_STEPPER_LOG_LEVEL_DBG=y
CONFIG_POLL=y
CONFIG_GPIO=y
CONFIG_STEPPER=y
+9 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2023 Carl Zeiss Meditec AG
 * SPDX-License-Identifier: Apache-2.0
 */

int main(void)
{
	return 0;
}
Loading