#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/complex.h"
#include "spandsp/dds.h"
#include "spandsp/power_meter.h"
#include "spandsp/async.h"
#include "spandsp/fsk.h"
Functions | |
fsk_tx_state_t * | fsk_tx_init (fsk_tx_state_t *s, fsk_spec_t *spec, get_bit_func_t get_bit, void *user_data) |
Initialise an FSK modem transmit context. | |
int | fsk_tx (fsk_tx_state_t *s, int16_t *amp, int len) |
Generate a block of FSK modem audio samples. | |
void | fsk_tx_power (fsk_tx_state_t *s, float power) |
Adjust an FSK modem transmit context's power output. | |
void | fsk_tx_set_get_bit (fsk_tx_state_t *s, get_bit_func_t get_bit, void *user_data) |
void | fsk_rx_signal_cutoff (fsk_rx_state_t *s, float cutoff) |
Adjust an FSK modem receive context's carrier detect power threshold. | |
float | fsk_rx_signal_power (fsk_rx_state_t *s) |
void | fsk_rx_set_put_bit (fsk_rx_state_t *s, put_bit_func_t put_bit, void *user_data) |
fsk_rx_state_t * | fsk_rx_init (fsk_rx_state_t *s, fsk_spec_t *spec, int sync_mode, put_bit_func_t put_bit, void *user_data) |
Initialise an FSK modem receive context. | |
int | fsk_rx (fsk_rx_state_t *s, const int16_t *amp, int len) |
Process a block of received FSK modem audio samples. | |
Variables | |
fsk_spec_t | preset_fsk_specs [] |
int fsk_rx | ( | fsk_rx_state_t * | s, | |
const int16_t * | amp, | |||
int | len | |||
) |
Process a block of received FSK modem audio samples.
Process a block of received FSK modem audio samples.
s | The modem context. | |
amp | The audio sample buffer. | |
len | The number of samples in the buffer. |
fsk_rx_state_t* fsk_rx_init | ( | fsk_rx_state_t * | s, | |
fsk_spec_t * | spec, | |||
int | sync_mode, | |||
put_bit_func_t | put_bit, | |||
void * | user_data | |||
) |
Initialise an FSK modem receive context.
Initialise an FSK modem receive context.
s | The modem context. | |
spec | The specification of the modem tones and rate. | |
sync_mode | TRUE for synchronous modem. FALSE for asynchronous mode. | |
put_bit | The callback routine used to put the received data. | |
user_data | An opaque pointer. |
void fsk_rx_signal_cutoff | ( | fsk_rx_state_t * | s, | |
float | cutoff | |||
) |
Adjust an FSK modem receive context's carrier detect power threshold.
Adjust an FSK modem receive context's carrier detect power threshold.
s | The modem context. | |
power | The power level, in dBm0 |
float fsk_rx_signal_power | ( | fsk_rx_state_t * | s | ) |
Get the current received signal power.
s | The modem context. |
int fsk_tx | ( | fsk_tx_state_t * | s, | |
int16_t * | amp, | |||
int | len | |||
) |
Generate a block of FSK modem audio samples.
Generate a block of FSK modem audio samples.
s | The modem context. | |
amp | The audio sample buffer. | |
len | The number of samples to be generated. |
fsk_tx_state_t* fsk_tx_init | ( | fsk_tx_state_t * | s, | |
fsk_spec_t * | spec, | |||
get_bit_func_t | get_bit, | |||
void * | user_data | |||
) |
Initialise an FSK modem transmit context.
Initialise an FSK modem transmit context.
s | The modem context. | |
spec | The specification of the modem tones and rate. | |
get_bit | The callback routine used to get the data to be transmitted. | |
user_data | An opaque pointer. |
void fsk_tx_power | ( | fsk_tx_state_t * | s, | |
float | power | |||
) |
Adjust an FSK modem transmit context's power output.
Adjust an FSK modem transmit context's power output.
s | The modem context. | |
power | The power level, in dBm0 |