PLANET-Q ES920LR Library
Dependents: IZU2020_GROUND_STATION IZU2020_AVIONICS IZU2020_AVIONICS
PQES920LR.h@0:064d3711be83, 2019-12-17 (annotated)
- Committer:
- tanahashi
- Date:
- Tue Dec 17 09:06:01 2019 +0000
- Revision:
- 0:064d3711be83
- Child:
- 1:a5114a32febe
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tanahashi | 0:064d3711be83 | 1 | #ifndef PQES920LR_H |
tanahashi | 0:064d3711be83 | 2 | #define PQES920LR_H |
tanahashi | 0:064d3711be83 | 3 | |
tanahashi | 0:064d3711be83 | 4 | class ES920LR { |
tanahashi | 0:064d3711be83 | 5 | private: |
tanahashi | 0:064d3711be83 | 6 | Serial *_serial; |
tanahashi | 0:064d3711be83 | 7 | char tx_buf[52]; |
tanahashi | 0:064d3711be83 | 8 | char rx_buf[52]; |
tanahashi | 0:064d3711be83 | 9 | char rx_size; |
tanahashi | 0:064d3711be83 | 10 | int index; |
tanahashi | 0:064d3711be83 | 11 | int flag; |
tanahashi | 0:064d3711be83 | 12 | bool response; |
tanahashi | 0:064d3711be83 | 13 | |
tanahashi | 0:064d3711be83 | 14 | void (*func)(char*); |
tanahashi | 0:064d3711be83 | 15 | |
tanahashi | 0:064d3711be83 | 16 | public: |
tanahashi | 0:064d3711be83 | 17 | ES920LR(Serial &serial); |
tanahashi | 0:064d3711be83 | 18 | void send(char *data, int size); |
tanahashi | 0:064d3711be83 | 19 | void attach(void(*func_ptr)(char*)); |
tanahashi | 0:064d3711be83 | 20 | |
tanahashi | 0:064d3711be83 | 21 | private: |
tanahashi | 0:064d3711be83 | 22 | void receive(); |
tanahashi | 0:064d3711be83 | 23 | }; |
tanahashi | 0:064d3711be83 | 24 | |
tanahashi | 0:064d3711be83 | 25 | #endif |