mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-15 19:51:37 +08:00
io_timer: reserve pins & timers on first use
This allows modules to do a first-come-first-serve pin/timer reservation on bootup. E.g. camera trigger reserves any of the pins, and then PWM/DShot output will just use the rest of the available pins.
This commit is contained in:
@@ -49,8 +49,9 @@ __BEGIN_DECLS
|
||||
*
|
||||
* @param channel_mask Bitmask of channels (LSB = channel 0) to enable.
|
||||
* This allows some of the channels to remain configured
|
||||
* as GPIOs or as another function.
|
||||
* @return OK on success.
|
||||
* as GPIOs or as another function. Already used channels/timers
|
||||
* will not be configured as PWM.
|
||||
* @return <0 on error, the initialized channels mask.
|
||||
*/
|
||||
__EXPORT extern int up_pwm_trigger_init(uint32_t channel_mask);
|
||||
|
||||
@@ -78,4 +79,4 @@ __EXPORT extern void up_pwm_trigger_arm(bool armed);
|
||||
*/
|
||||
__EXPORT extern int up_pwm_trigger_set(unsigned channel, uint16_t value);
|
||||
|
||||
__END_DECLS
|
||||
__END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user