DRA818 VHF or UHF radio module library. http://www.dorji.com/docs/data/DRA818V.pdf
dra818.h@3:b822fbac58f4, 2016-05-26 (annotated)
- Committer:
- ebarranco
- Date:
- Thu May 26 18:50:36 2016 +0000
- Revision:
- 3:b822fbac58f4
- Parent:
- 0:cb7724063ba3
Rename example to avoid main conflicts. Maybe there is a better way to do this?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ebarranco | 0:cb7724063ba3 | 1 | #ifndef MBED_DRA818_H |
ebarranco | 0:cb7724063ba3 | 2 | #define MBED_DRA818_H |
ebarranco | 0:cb7724063ba3 | 3 | |
ebarranco | 0:cb7724063ba3 | 4 | #include "mbed.h" |
ebarranco | 0:cb7724063ba3 | 5 | |
ebarranco | 0:cb7724063ba3 | 6 | class DRA818 { |
ebarranco | 0:cb7724063ba3 | 7 | public: |
ebarranco | 0:cb7724063ba3 | 8 | DRA818(Serial *s, PinName PTT); |
ebarranco | 0:cb7724063ba3 | 9 | void setTXFreq(double tx_freq); |
ebarranco | 0:cb7724063ba3 | 10 | void setRXFreq(double rx_freq); |
ebarranco | 0:cb7724063ba3 | 11 | void setTXCTCSS(uint8_t tx_ctcss); |
ebarranco | 0:cb7724063ba3 | 12 | void setRXCTCSS(uint8_t rx_ctcss); |
ebarranco | 0:cb7724063ba3 | 13 | void setSquelch(uint8_t sql); |
ebarranco | 0:cb7724063ba3 | 14 | void setVolume(uint8_t vol); |
ebarranco | 0:cb7724063ba3 | 15 | void setGWB(bool gwb); |
ebarranco | 0:cb7724063ba3 | 16 | void setFilters(bool preemph, bool highpass, bool lowpass); |
ebarranco | 0:cb7724063ba3 | 17 | void writeFreq(); |
ebarranco | 0:cb7724063ba3 | 18 | |
ebarranco | 0:cb7724063ba3 | 19 | private: |
ebarranco | 0:cb7724063ba3 | 20 | Serial *serial; |
ebarranco | 0:cb7724063ba3 | 21 | DigitalOut PTT_PIN; |
ebarranco | 0:cb7724063ba3 | 22 | uint8_t tx_ctcss; |
ebarranco | 0:cb7724063ba3 | 23 | uint8_t rx_ctcss; |
ebarranco | 0:cb7724063ba3 | 24 | float tx_freq; |
ebarranco | 0:cb7724063ba3 | 25 | float rx_freq; |
ebarranco | 0:cb7724063ba3 | 26 | bool gwb; |
ebarranco | 0:cb7724063ba3 | 27 | uint8_t volume; |
ebarranco | 0:cb7724063ba3 | 28 | uint8_t squelch; |
ebarranco | 0:cb7724063ba3 | 29 | uint8_t preemph; |
ebarranco | 0:cb7724063ba3 | 30 | uint8_t highpass; |
ebarranco | 0:cb7724063ba3 | 31 | uint8_t lowpass; |
ebarranco | 0:cb7724063ba3 | 32 | char buffer[60]; |
ebarranco | 0:cb7724063ba3 | 33 | }; |
ebarranco | 0:cb7724063ba3 | 34 | #endif |