mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
modalai fc-v1: add dshot support
This commit is contained in:
committed by
Daniel Agar
parent
367e756c81
commit
1d44231cd4
@@ -24,6 +24,7 @@ px4_add_board(
|
|||||||
camera_trigger
|
camera_trigger
|
||||||
differential_pressure # all available differential pressure drivers
|
differential_pressure # all available differential pressure drivers
|
||||||
distance_sensor # all available distance sensor drivers
|
distance_sensor # all available distance sensor drivers
|
||||||
|
dshot
|
||||||
gps
|
gps
|
||||||
imu/bmi088
|
imu/bmi088
|
||||||
# TODO imu/icm42688
|
# TODO imu/icm42688
|
||||||
|
|||||||
@@ -480,6 +480,8 @@
|
|||||||
|
|
||||||
#define BOARD_NUM_IO_TIMERS 5
|
#define BOARD_NUM_IO_TIMERS 5
|
||||||
|
|
||||||
|
#define BOARD_DSHOT_MOTOR_ASSIGNMENT {3, 2, 1, 0, 4, 5, 6, 7};
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
/****************************************************************************************************
|
/****************************************************************************************************
|
||||||
|
|||||||
@@ -75,6 +75,13 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
|||||||
.last_channel_index = 3,
|
.last_channel_index = 3,
|
||||||
.handler = io_timer_handler0,
|
.handler = io_timer_handler0,
|
||||||
.vectorno = STM32_IRQ_TIM1CC,
|
.vectorno = STM32_IRQ_TIM1CC,
|
||||||
|
.dshot = {
|
||||||
|
.dma_base = DSHOT_DMA2_BASE,
|
||||||
|
.channel = DShot_Channel6,
|
||||||
|
.stream = DShot_Stream5,
|
||||||
|
.start_ccr_register = TIM_DMABASE_CCR1,
|
||||||
|
.channels_number = 4u /* CCR1, CCR2, CCR3 and CCR4 */
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.base = STM32_TIM4_BASE,
|
.base = STM32_TIM4_BASE,
|
||||||
|
|||||||
Reference in New Issue
Block a user