RadioLib
Universal wireless communication library for Arduino
FSK4Client Class Reference

Client for FSK-4 communication. The public interface is the same as Arduino Serial. More...

#include <FSK4.h>

Public Member Functions

 FSK4Client (PhysicalLayer *phy)
 Constructor for FSK-4 mode. More...
 
 FSK4Client (AFSKClient *audio)
 Constructor for AFSK mode. More...
 
int16_t begin (float base, uint32_t shift, uint16_t rate)
 Initialization method. More...
 
void idle ()
 Send out idle condition (RF tone at mark frequency).
 
int16_t setCorrection (int16_t offsets[4], float length=1.0f)
 Set correction coefficients for frequencies and tone length. More...
 
size_t write (uint8_t *buff, size_t len)
 Transmit binary data. More...
 
size_t write (uint8_t b)
 Transmit a single byte. More...
 
int16_t standby ()
 Stop transmitting. More...
 

Detailed Description

Client for FSK-4 communication. The public interface is the same as Arduino Serial.

Constructor & Destructor Documentation

◆ FSK4Client() [1/2]

FSK4Client::FSK4Client ( PhysicalLayer phy)
explicit

Constructor for FSK-4 mode.

Parameters
phyPointer to the wireless module providing PhysicalLayer communication.

◆ FSK4Client() [2/2]

FSK4Client::FSK4Client ( AFSKClient audio)
explicit

Constructor for AFSK mode.

Parameters
audioPointer to the AFSK instance providing audio.

Member Function Documentation

◆ begin()

int16_t FSK4Client::begin ( float  base,
uint32_t  shift,
uint16_t  rate 
)

Initialization method.

Parameters
baseBase (space) frequency to be used in MHz (in FSK-4 mode), or the space tone frequency in Hz (in AFSK mode)
shiftFrequency shift between each tone in Hz.
rateBaud rate to be used during transmission.
Returns
Status Codes

◆ setCorrection()

int16_t FSK4Client::setCorrection ( int16_t  offsets[4],
float  length = 1.0f 
)

Set correction coefficients for frequencies and tone length.

Parameters
offsetsFour positive or negative correction offsets for audio frequencies in Hz.
lengthTone length modifier, defaults to 1.0.
Returns
Status Codes

◆ standby()

int16_t FSK4Client::standby ( )

Stop transmitting.

Returns
Status Codes

◆ write() [1/2]

size_t FSK4Client::write ( uint8_t *  buff,
size_t  len 
)

Transmit binary data.

Parameters
buffBuffer to transmit.
lenNumber of bytes to transmit.
Returns
Number of transmitted bytes.

◆ write() [2/2]

size_t FSK4Client::write ( uint8_t  b)

Transmit a single byte.

Parameters
bByte to transmit.
Returns
Number of transmitted bytes.

The documentation for this class was generated from the following files: