Logic Analyzer RPi
Logic Analyzer for the Raspberry Pi
 All Classes Files Functions Variables Pages
transition.h
1 //#include <stdio.h>
2 //#include <string.h>
3 //#include <stdlib.h>
4 //#include <mgl/mgl_fltk.h>
5 #include <mgl/mgl_zb.h>
6 //#include <unistd.h>
7 
8 #ifndef LOGIC_INPUT
9 #define LOGIC_INPUT
10 #include "logic_input.h"
11 #endif
12 
13 #ifndef ACTIVITY
14 #define ACTIVITY
15 #include "activity.h"
16 #endif
17 
18 #ifndef DEBUG_H
19 #define DEBUG_H
20 #include "debug.h"
21 #endif
22 
24 class transition: public mglDraw //clock transitions
25 {
26 public:
28 
29  transition(logic_input *data=NULL,uint8_t pin_clock=1,activity *cs=NULL);
31 
35  void init(logic_input *data,uint8_t pin_clock,activity *cs=NULL);
37  ~transition();
39 
43  float GetStats(activity *cs,char sign='u');
45 
49  void find_transition(logic_input *data,char sign='u');
51 
52  int Draw(mglGraph *gr);
54 
59  int Draw(mglGraph *gr,char sign,uint8_t subplot);
60 //private:
62  uint32_t ntransition_up;
66  mglData t_transition_up;
68  uint32_t ntransition_down;
74  uint8_t npin;
76  uint8_t pin_clock;
78  float period;
80  float period_min;
82  float period_max;
84 
86 };