36 #include <px4_platform_common/log.h> 44 #define RCOUT_ZYNQ_PWM_BASE 0x43c00000 54 PX4_WARN(
"number of outputs too large. Setting to %i",
MAX_ZYNQ_PWMS);
68 unsigned long duty =
TICK_PER_S / (
unsigned long)freq_hz;
74 uint32_t mem_fd = open(
_device, O_RDWR | O_SYNC);
80 PX4_ERR(
"initialize pwm pointer failed.");
100 for (
int i = 0; i < num_outputs; ++i) {
struct s_period_hi periodhi[MAX_ZYNQ_PWMS]
static constexpr int MAX_ZYNQ_PWMS
maximum number of pwm channels
volatile struct pwm_cmd * _shared_mem_cmd
#define RCOUT_ZYNQ_PWM_BASE
static const int TICK_PER_US
OcpocMmapPWMOut(int max_num_outputs)
static unsigned long freq2tick(uint16_t freq_hz)
int send_output_pwm(const uint16_t *pwm, int num_outputs) override
virtual ~OcpocMmapPWMOut()
static const int TICK_PER_S
static constexpr const char * _device
static const int FREQUENCY_PWM