File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44name : Documentation
55
6- on : [push, pull_request]
6+ on :
7+ push :
8+ branches :
9+ - main
10+ pull_request :
711
812permissions :
913 contents : read
Original file line number Diff line number Diff line change 44 */
55
66/* Devicetree overlay enabling the Moonlite focuser firmware on ESP32-S3 DevKitC
7- * (PROCPU). The TMC2209 stepper driver is exposed via the "stepper" and
8- * "stepper-drv" aliases, while the zephyr,user node supplies the UART phandle
7+ * (PROCPU). The zephyr,gpio-step-dir-controller drives the step/dir pins
8+ * referenced by the "stepper" alias, while the dedicated TMC2209 device is
9+ * referenced by the "stepper-drv" alias so the application can toggle the
10+ * external driver rails. The zephyr,user node supplies the UART phandle
911 * consumed by the application.
1012 */
1113
1214/ {
1315 aliases {
1416 stepper = &focuser_stepper;
15- stepper-drv = &focuser_stepper ;
17+ stepper-drv = &focuser_stepper_drv ;
1618 };
1719
18- focuser_stepper: focuser_stepper {
20+ focuser_stepper_drv: focuser_stepper_drv {
1921 compatible = "adi,tmc2209";
22+ en-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
23+ micro-step-res = <1>;
24+ status = "okay";
25+ };
26+
27+ focuser_stepper: focuser_stepper {
28+ compatible = "zephyr,gpio-step-dir-controller";
2029 step-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
2130 dir-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
22- en-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
2331 step-width-ns = <10000>;
24- micro-step-res = <1>;
2532 status = "okay";
2633 };
2734
Original file line number Diff line number Diff line change 33 *
44 * Devicetree overlay enabling the Moonlite focuser firmware on the
55 * qemu_cortex_m0 board. The design uses the generic GPIO H-bridge stepper
6- * controller so the application can run entirely in the simulator.
6+ * controller for motion ("stepper" alias) plus the Zephyr fake stepper
7+ * driver ("stepper-drv" alias) so the application can exercise the driver
8+ * enable path under simulation.
79 */
810
911/ {
1012 aliases {
1113 stepper = &focuser_stepper;
12- stepper-drv = &focuser_stepper;
14+ stepper-drv = &focuser_stepper_drv;
15+ };
16+
17+ focuser_stepper_drv: focuser_stepper_drv {
18+ compatible = "zephyr,fake-stepper-driver";
19+ status = "okay";
1320 };
1421
1522 focuser_stepper: focuser_stepper {
16- compatible = "zephyr,h-bridge-stepper";
17- /* Four phase outputs feeding a simulated H-bridge. */
18- gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>,
19- <&gpio0 2 GPIO_ACTIVE_HIGH>,
20- <&gpio0 3 GPIO_ACTIVE_HIGH>,
21- <&gpio0 4 GPIO_ACTIVE_HIGH>;
22- en-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
23- micro-step-res = <1>;
23+ compatible = "zephyr,fake-stepper-controller";
2424 status = "okay";
2525 };
2626
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ CONFIG_LOG_BACKEND_UART=y
2424# Set the application log level.
2525CONFIG_APP_LOG_LEVEL_INF=y
2626
27+ CONFIG_COUNTER=y
28+
2729# Enable Zephyr's generic stepper controller subsystem and the TMC2209 backend.
2830CONFIG_STEPPER=y
2931CONFIG_STEPPER_ADI_TMC2209=y
Original file line number Diff line number Diff line change 88 build_only : true
99 integration_platforms :
1010 - esp32s3_devkitc/esp32s3/procpu
11- - qemu_cortex_m0
1211tests :
1312 app.default : {}
1413 app.debug :
Original file line number Diff line number Diff line change @@ -93,5 +93,5 @@ int ZephyrFocuserStepper::enable_driver(bool enable)
9393 return 0 ;
9494 }
9595
96- return enable ? stepper_enable (m_stepper_drv) : stepper_disable (m_stepper_drv);
96+ return enable ? stepper_drv_enable (m_stepper_drv) : stepper_drv_disable (m_stepper_drv);
9797}
You can’t perform that action at this time.
0 commit comments