PX4 Firmware
PX4 Autopilot Software http://px4.io
drv_pwm_trigger.h File Reference
#include <px4_platform_common/defines.h>
#include <stdint.h>
Include dependency graph for drv_pwm_trigger.h:

Go to the source code of this file.

Functions

__BEGIN_DECLS __EXPORT int up_pwm_trigger_init (uint32_t channel_mask)
 Intialise the PWM servo outputs using the specified configuration. More...
 
__EXPORT void up_pwm_trigger_deinit (void)
 De-initialise the PWM trigger outputs. More...
 
__EXPORT void up_pwm_trigger_arm (bool armed)
 Arm or disarm trigger outputs. More...
 
__EXPORT int up_pwm_trigger_set (unsigned channel, uint16_t value)
 Set the current output value for a channel. More...
 

Function Documentation

◆ up_pwm_trigger_arm()

__EXPORT void up_pwm_trigger_arm ( bool  armed)

Arm or disarm trigger outputs.

Bug:
This function should, but does not, guarantee that any pulse currently in progress is cleanly completed.
Parameters
armedIf true, outputs are armed; if false they are disarmed.

◆ up_pwm_trigger_deinit()

__EXPORT void up_pwm_trigger_deinit ( void  )

De-initialise the PWM trigger outputs.

◆ up_pwm_trigger_init()

__BEGIN_DECLS __EXPORT int up_pwm_trigger_init ( uint32_t  channel_mask)

Intialise the PWM servo outputs using the specified configuration.

Parameters
channel_maskBitmask of channels (LSB = channel 0) to enable. This allows some of the channels to remain configured as GPIOs or as another function.
Returns
OK on success.

◆ up_pwm_trigger_set()

__EXPORT int up_pwm_trigger_set ( unsigned  channel,
uint16_t  value 
)

Set the current output value for a channel.

Parameters
channelThe channel to set.
valueThe output pulse width in microseconds.