acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
AFSK.h (1656B)
1 #if !defined(_RADIOLIB_AFSK_H) 2 #define _RADIOLIB_AFSK_H 3 4 #include "../../TypeDef.h" 5 6 #if !defined(RADIOLIB_EXCLUDE_AFSK) 7 8 #include "../../Module.h" 9 10 #include "../PhysicalLayer/PhysicalLayer.h" 11 12 /*! 13 \class AFSKClient 14 15 \brief Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins. 16 */ 17 class AFSKClient { 18 public: 19 /*! 20 \brief Default contructor. 21 22 \param phy Pointer to the wireless module providing PhysicalLayer communication. 23 24 \param pin The pin that will be used for audio output. 25 */ 26 AFSKClient(PhysicalLayer* phy, RADIOLIB_PIN_TYPE pin); 27 28 /*! 29 \brief Initialization method. 30 31 \returns \ref status_codes 32 */ 33 int16_t begin(); 34 35 /*! 36 \brief Start transmitting audio tone. 37 38 \param freq Frequency of the tone in Hz. 39 40 \param autoStart Whether to automatically enter transmission mode. Defaults to true. 41 42 \returns \ref status_codes 43 */ 44 int16_t tone(uint16_t freq, bool autoStart = true); 45 46 /*! 47 \brief Stops transmitting audio tone. 48 49 \param freq Keep transmitter on - this may limit noise when switching transmitter on or off. 50 51 \returns \ref status_codes 52 */ 53 int16_t noTone(bool keepOn = false); 54 55 #if !defined(RADIOLIB_GODMODE) 56 private: 57 #endif 58 PhysicalLayer* _phy; 59 RADIOLIB_PIN_TYPE _pin; 60 61 // allow specific classes access the private PhysicalLayer pointer 62 friend class RTTYClient; 63 friend class MorseClient; 64 friend class HellClient; 65 friend class SSTVClient; 66 friend class AX25Client; 67 friend class FSK4Client; 68 }; 69 70 #endif 71 72 #endif