APM:Libraries
RCInput_ZYNQ.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*
4  This class implements RCInput on the ZYNQ / ZyboPilot platform with custom
5  logic doing the edge detection of the PPM sum input
6  */
7 
8 #include "RCInput.h"
9 
10 namespace Linux {
11 
12 class RCInput_ZYNQ : public RCInput {
13 public:
14  void init();
15  void _timer_tick(void);
16 
17 private:
18 #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_OCPOC_ZYNQ
19  static const int TICK_PER_US=50;
20  static const int TICK_PER_S=50000000;
21 #else
22  static const int TICK_PER_US=100;
23  static const int TICK_PER_S=100000000;
24 #endif
25 
26  // Memory mapped keyhole register to pulse input FIFO
27  volatile uint32_t *pulse_input;
28 
29  // time spent in the low state
30  uint32_t _s0_time;
31 };
32 
33 }
void _timer_tick(void)
volatile uint32_t * pulse_input
Definition: RCInput_ZYNQ.h:27
static const int TICK_PER_S
Definition: RCInput_ZYNQ.h:20
static const int TICK_PER_US
Definition: RCInput_ZYNQ.h:19