1
1
/****************************************************************************
2
2
*
3
- * Copyright (C) 2012, 2017 PX4 Development Team. All rights reserved.
3
+ * Copyright (C) 2024 PX4 Development Team. All rights reserved.
4
4
*
5
5
* Redistribution and use in source and binary forms, with or without
6
6
* modification, are permitted provided that the following conditions
@@ -80,6 +80,8 @@ typedef enum io_timer_channel_mode_t {
80
80
IOTimerChanMode_LED = 7 ,
81
81
IOTimerChanMode_PPS = 8 ,
82
82
IOTimerChanMode_Other = 9 ,
83
+ IOTimerChanMode_DshotInverted = 10 ,
84
+ IOTimerChanMode_CaptureDMA = 11 ,
83
85
IOTimerChanModeSize
84
86
} io_timer_channel_mode_t ;
85
87
@@ -158,7 +160,12 @@ __EXPORT int io_timer_unallocate_channel(unsigned channel);
158
160
__EXPORT int io_timer_get_channel_mode (unsigned channel );
159
161
__EXPORT int io_timer_get_mode_channels (io_timer_channel_mode_t mode );
160
162
__EXPORT extern void io_timer_trigger (unsigned channels_mask );
163
+
161
164
__EXPORT void io_timer_update_dma_req (uint8_t timer , bool enable );
165
+ __EXPORT int io_timer_set_dshot_burst_mode (uint8_t timer , unsigned dshot_pwm_rate , uint8_t dma_burst_length );
166
+
167
+ __EXPORT void io_timer_capture_dma_req (uint8_t timer , uint8_t timer_channel_index , bool enable );
168
+ __EXPORT int io_timer_set_dshot_capture_mode (uint8_t timer , uint8_t timer_channel_index , unsigned dshot_pwm_freq );
162
169
163
170
/**
164
171
* Reserve a timer
@@ -168,7 +175,6 @@ __EXPORT int io_timer_allocate_timer(unsigned timer, io_timer_channel_mode_t mod
168
175
169
176
__EXPORT int io_timer_unallocate_timer (unsigned timer );
170
177
171
- __EXPORT extern int io_timer_set_dshot_mode (uint8_t timer , unsigned dshot_pwm_rate , uint8_t dma_burst_length );
172
178
173
179
/**
174
180
* Returns the pin configuration for a specific channel, to be used as GPIO output.
0 commit comments