RadioLibSmol/src/protocols/AFSK/AFSK.h
Jan Gromeš e57c9b08ea
[Doxygen] Warnings fixes (#1046)
* [APRS] Fix Doxygen warnings

* [Print] Fix Doxygen warnings

* [CC1101] Fixed doxygen warnings

* [nRF24] Fixed doxygen warnings

* [RF69] Fixed doxygen warnings

* [SX126x] Fixed doxygen warnings

* [SX127x] Fixed doxygen warnings

* [AFSK] Fixed doxygen warnings

* [APRS] Fixed doxygen warnings

* [Bell] Fixed doxygen warnings

* [Ext] Fixed doxygen warnings

* [LoRaWAN] Fixed doxygen warnings

* [PHY] Fixed doxygen warnings

* [Print] Fixed doxygen warnings

* [Mod] Fixed doxygen warnings
2024-04-01 11:11:24 +02:00

70 lines
1.7 KiB
C++

#if !defined(_RADIOLIB_AFSK_H)
#define _RADIOLIB_AFSK_H
#include "../../TypeDef.h"
#if !RADIOLIB_EXCLUDE_AFSK
#include "../../Module.h"
#include "../PhysicalLayer/PhysicalLayer.h"
/*!
\class AFSKClient
\brief Client for audio-based transmissions. Requires Arduino tone() function, and a module capable of direct mode transmission using DIO pins.
*/
class AFSKClient {
public:
/*!
\brief Default contructor.
\param phy Pointer to the wireless module providing PhysicalLayer communication.
\param pin The pin that will be used for audio output.
*/
AFSKClient(PhysicalLayer* phy, uint32_t pin);
/*!
\brief Copy contructor.
\param aud Pointer to the AFSKClient instance to copy.
*/
AFSKClient(AFSKClient* aud);
/*!
\brief Initialization method.
\returns \ref status_codes
*/
int16_t begin();
/*!
\brief Start transmitting audio tone.
\param freq Frequency of the tone in Hz.
\param autoStart Whether to automatically enter transmission mode. Defaults to true.
\returns \ref status_codes
*/
int16_t tone(uint16_t freq, bool autoStart = true);
/*!
\brief Stops transmitting audio tone.
\param keepOn Keep transmitter on - this may limit noise when switching transmitter on or off.
\returns \ref status_codes
*/
int16_t noTone(bool keepOn = false);
#if !RADIOLIB_GODMODE
private:
#endif
PhysicalLayer* phyLayer;
uint32_t outPin;
// allow specific classes access the private PhysicalLayer pointer
friend class RTTYClient;
friend class MorseClient;
friend class HellClient;
friend class SSTVClient;
friend class AX25Client;
friend class FSK4Client;
friend class BellClient;
};
#endif
#endif