Commit ccf97b17 authored by NiZenMeZhiDao's avatar NiZenMeZhiDao
Browse files

Added Kconfig support for PID, along with some code for interboard and Xiaomi motor.

parent f3349bd9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: Apache-2.0

# keep first
board_runner_args(openocd)
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
board_runner_args(openocd)

board_runner_args(pyocd "--target=STM32H723VG")
board_runner_args(jlink "--device=STM32H723VG" "--speed=4000")

# keep first
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)

include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
+4 −1
Original line number Diff line number Diff line
@@ -348,7 +348,10 @@ zephyr_udc0: &usbotg_fs {
			&spi4_sck_pe12
			&spi4_nss_pe4>;
	pinctrl-names="default";
	
	dmas = <&dma2 0 4 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>,
		   <&dma2 4 5 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>;
	//<&dmax stream channel flags>
	dma-names = "rx", "tx";
};

&spi5 {
+12 −0
Original line number Diff line number Diff line
@@ -247,3 +247,15 @@ zephyr_udc0: &usbotg_fs {
		int3-4-conf-io = <0x01>;
    };
};
&spi2{
	status = "okay";
	pinctrl-0=<&spi2_mosi_pb15
			&spi2_miso_pb14
			&spi2_sck_pb13
			&spi2_nss_pb12>;
	pinctrl-names="default";
	dmas = <&dma1 3 0 STM32_DMA_PERIPH_RX STM32_DMA_FIFO_FULL>,
		   <&dma1 4 0 STM32_DMA_PERIPH_TX STM32_DMA_FIFO_FULL>;
	//<&dmax stream channel flags>
	dma-names = "rx", "tx";
};
 No newline at end of file
+5 −10
Original line number Diff line number Diff line
@@ -6,21 +6,16 @@

# add_definitions(-D__ZEPHYR_SUPERVISOR__)

add_subdirectory_ifdef(CONFIG_MOTOR_DJI motor)
add_subdirectory_ifdef(CONFIG_MOTOR_DJI pid)
add_subdirectory_ifdef(CONFIG_MOTOR_DJI motor/dji)

add_subdirectory_ifdef(CONFIG_MOTOR_MI motor)
add_subdirectory_ifdef(CONFIG_MOTOR_MI pid)
add_subdirectory_ifdef(CONFIG_MOTOR_MI motor/mi)

add_subdirectory_ifdef(CONFIG_MOTOR_DM motor)
add_subdirectory_ifdef(CONFIG_MOTOR_DM pid)
add_subdirectory_ifdef(CONFIG_MOTOR_DM motor/dm)

add_subdirectory_ifdef(CONFIG_PID pid)

add_subdirectory_ifdef(CONFIG_ARES_SBUS transfer)

add_subdirectory_ifdef(CONFIG_CHASSIS chassis)

add_subdirectory_ifdef(CONFIG_WHEEL wheel)

if(CONFIG_IMU_PWM_TEMP_CTRL AND NOT CONFIG_MOTOR_DJI AND NOT CONFIG_MOTOR_MI AND NOT CONFIG_MOTOR_DM)
    add_subdirectory(pid)
endif()
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -6,4 +6,5 @@ rsource "motor/Kconfig"
rsource "transfer/Kconfig"
rsource "chassis/Kconfig"
rsource "wheel/Kconfig"
rsource "pid/Kconfig"
endmenu
 No newline at end of file
Loading