PX4 Firmware
PX4 Autopilot Software http://px4.io
|
class OcpocMmapPWMOut PWM output class for Aerotenna OcPoC via mmap More...
#include <ocpoc_mmap.h>
Classes | |
struct | pwm_cmd |
struct | s_period_hi |
Public Member Functions | |
OcpocMmapPWMOut (int max_num_outputs) | |
virtual | ~OcpocMmapPWMOut () |
int | init () override |
int | send_output_pwm (const uint16_t *pwm, int num_outputs) override |
Public Member Functions inherited from linux_pwm_out::PWMOutBase | |
virtual | ~PWMOutBase () |
Static Private Member Functions | |
static unsigned long | freq2tick (uint16_t freq_hz) |
Private Attributes | |
volatile struct pwm_cmd * | _shared_mem_cmd = nullptr |
int | _num_outputs |
Static Private Attributes | |
static constexpr int | MAX_ZYNQ_PWMS = 8 |
maximum number of pwm channels More... | |
static constexpr const char * | _device = "/dev/mem" |
class OcpocMmapPWMOut PWM output class for Aerotenna OcPoC via mmap
Definition at line 45 of file ocpoc_mmap.h.
OcpocMmapPWMOut::OcpocMmapPWMOut | ( | int | max_num_outputs | ) |
Definition at line 49 of file ocpoc_mmap.cpp.
References _num_outputs, and MAX_ZYNQ_PWMS.
|
virtual |
Definition at line 59 of file ocpoc_mmap.cpp.
References _shared_mem_cmd.
|
staticprivate |
Definition at line 66 of file ocpoc_mmap.cpp.
References TICK_PER_S.
Referenced by init().
|
overridevirtual |
Implements linux_pwm_out::PWMOutBase.
Definition at line 72 of file ocpoc_mmap.cpp.
References _device, _num_outputs, _shared_mem_cmd, freq2tick(), FREQUENCY_PWM, linux_pwm_out::OcpocMmapPWMOut::s_period_hi::hi, linux_pwm_out::OcpocMmapPWMOut::s_period_hi::period, linux_pwm_out::OcpocMmapPWMOut::pwm_cmd::periodhi, and RCOUT_ZYNQ_PWM_BASE.
|
overridevirtual |
Implements linux_pwm_out::PWMOutBase.
Definition at line 93 of file ocpoc_mmap.cpp.
References _num_outputs, _shared_mem_cmd, linux_pwm_out::OcpocMmapPWMOut::s_period_hi::hi, linux_pwm_out::OcpocMmapPWMOut::pwm_cmd::periodhi, and TICK_PER_US.
|
staticprivate |
Definition at line 71 of file ocpoc_mmap.h.
Referenced by init().
|
private |
Definition at line 72 of file ocpoc_mmap.h.
Referenced by init(), OcpocMmapPWMOut(), and send_output_pwm().
|
private |
Definition at line 70 of file ocpoc_mmap.h.
Referenced by init(), send_output_pwm(), and ~OcpocMmapPWMOut().
|
staticprivate |
maximum number of pwm channels
Definition at line 58 of file ocpoc_mmap.h.
Referenced by OcpocMmapPWMOut().