Edgar Barranco / DRA818lib

DRA818 VHF or UHF radio module library. http://www.dorji.com/docs/data/DRA818V.pdf

Committer:
ebarranco
Date:
Thu May 26 18:50:36 2016 +0000
Revision:
3:b822fbac58f4
Rename example to avoid main conflicts. Maybe there is a better way to do this?

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ebarranco0:cb7724063ba3 1#ifndef MBED_DRA818_H
ebarranco0:cb7724063ba3 2#define MBED_DRA818_H
ebarranco0:cb7724063ba3 3
ebarranco0:cb7724063ba3 4#include "mbed.h"
ebarranco0:cb7724063ba3 5
ebarranco0:cb7724063ba3 6class DRA818 {
ebarranco0:cb7724063ba3 7 public:
ebarranco0:cb7724063ba3 8 DRA818(Serial *s, PinName PTT);
ebarranco0:cb7724063ba3 9 void setTXFreq(double tx_freq);
ebarranco0:cb7724063ba3 10 void setRXFreq(double rx_freq);
ebarranco0:cb7724063ba3 11 void setTXCTCSS(uint8_t tx_ctcss);
ebarranco0:cb7724063ba3 12 void setRXCTCSS(uint8_t rx_ctcss);
ebarranco0:cb7724063ba3 13 void setSquelch(uint8_t sql);
ebarranco0:cb7724063ba3 14 void setVolume(uint8_t vol);
ebarranco0:cb7724063ba3 15 void setGWB(bool gwb);
ebarranco0:cb7724063ba3 16 void setFilters(bool preemph, bool highpass, bool lowpass);
ebarranco0:cb7724063ba3 17 void writeFreq();
ebarranco0:cb7724063ba3 18
ebarranco0:cb7724063ba3 19 private:
ebarranco0:cb7724063ba3 20 Serial *serial;
ebarranco0:cb7724063ba3 21 DigitalOut PTT_PIN;
ebarranco0:cb7724063ba3 22 uint8_t tx_ctcss;
ebarranco0:cb7724063ba3 23 uint8_t rx_ctcss;
ebarranco0:cb7724063ba3 24 float tx_freq;
ebarranco0:cb7724063ba3 25 float rx_freq;
ebarranco0:cb7724063ba3 26 bool gwb;
ebarranco0:cb7724063ba3 27 uint8_t volume;
ebarranco0:cb7724063ba3 28 uint8_t squelch;
ebarranco0:cb7724063ba3 29 uint8_t preemph;
ebarranco0:cb7724063ba3 30 uint8_t highpass;
ebarranco0:cb7724063ba3 31 uint8_t lowpass;
ebarranco0:cb7724063ba3 32 char buffer[60];
ebarranco0:cb7724063ba3 33};
ebarranco0:cb7724063ba3 34#endif