From ee3f7244ba9cbc8932f35f28d9593a428375a582 Mon Sep 17 00:00:00 2001 From: alexklimaj Date: Tue, 26 Nov 2024 14:20:13 -0700 Subject: [PATCH] boards: add ark fpv and pi6x BOARD_DMA_NUM_DSHOT_CHANNELS --- boards/ark/fpv/src/board_config.h | 3 +++ boards/ark/fpv/src/timer_config.cpp | 2 +- boards/ark/pi6x/src/board_config.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/boards/ark/fpv/src/board_config.h b/boards/ark/fpv/src/board_config.h index 081dbb56698f..d2f2968a6fc4 100644 --- a/boards/ark/fpv/src/board_config.h +++ b/boards/ark/fpv/src/board_config.h @@ -304,6 +304,9 @@ /* This board provides a DMA pool and APIs */ #define BOARD_DMA_ALLOC_POOL_SIZE 5120 +/* This board has 3 DMA channels available for bidirectional dshot */ +#define BOARD_DMA_NUM_DSHOT_CHANNELS 3 + /* This board provides the board_on_reset interface */ #define BOARD_HAS_ON_RESET 1 diff --git a/boards/ark/fpv/src/timer_config.cpp b/boards/ark/fpv/src/timer_config.cpp index 623aad1f0601..711ad62289cd 100644 --- a/boards/ark/fpv/src/timer_config.cpp +++ b/boards/ark/fpv/src/timer_config.cpp @@ -58,7 +58,7 @@ constexpr io_timers_t io_timers[MAX_IO_TIMERS] = { initIOTimer(Timer::Timer5, DMA{DMA::Index1}), initIOTimer(Timer::Timer8, DMA{DMA::Index1}), - initIOTimer(Timer::Timer4, DMA{DMA::Index1}), + initIOTimer(Timer::Timer4), }; constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = { diff --git a/boards/ark/pi6x/src/board_config.h b/boards/ark/pi6x/src/board_config.h index 5e123db35124..8988aa619d30 100644 --- a/boards/ark/pi6x/src/board_config.h +++ b/boards/ark/pi6x/src/board_config.h @@ -309,6 +309,9 @@ /* This board provides a DMA pool and APIs */ #define BOARD_DMA_ALLOC_POOL_SIZE 5120 +/* This board has 4 DMA channels available for bidirectional dshot */ +#define BOARD_DMA_NUM_DSHOT_CHANNELS 4 + /* This board provides the board_on_reset interface */ #define BOARD_HAS_ON_RESET 1