aboutsummaryrefslogtreecommitdiffstats
path: root/src/libfsk/fsk.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfsk/fsk.h')
-rw-r--r--src/libfsk/fsk.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libfsk/fsk.h b/src/libfsk/fsk.h
index cb62170..da67f46 100644
--- a/src/libfsk/fsk.h
+++ b/src/libfsk/fsk.h
@@ -6,8 +6,10 @@
typedef struct fsk_mod {
void *inst;
int (*send_bit)(void *inst);
- double bits_per_sample; /* fraction of a bit per sample */
+ double bits65536_per_sample; /* fraction of a bit per sample */
double *sin_tab; /* sine table with correct peak level */
+ double *phase_tab_0_1; /* cosine shaped phase table (bit 0 to 1) */
+ double *phase_tab_1_0; /* cosine shaped phase table (bit 1 to 0) */
double phaseshift65536[2]; /* how much the phase of fsk synbol changes per sample */
double cycles_per_bit65536[2]; /* cycles of one bit */
double tx_phase65536; /* current transmit phase */
@@ -17,9 +19,9 @@ typedef struct fsk_mod {
double f1_deviation;
int low_bit, high_bit; /* a low or high deviation means which bit? */
int tx_bit; /* current transmitting bit (-1 if not set) */
- double tx_bitpos; /* current transmit position in bit */
+ int tx_last_bit; /* last transmitting bit (-1 if not set) */
+ double tx_bitpos65536; /* current transmit position in bit */
int filter; /* set, if filters are used */
- iir_filter_t lp[2]; /* filter to smooth transmission spectrum */
} fsk_mod_t;
typedef struct fsk_demod {
@@ -39,7 +41,7 @@ typedef struct fsk_demod {
int fsk_mod_init(fsk_mod_t *fsk, void *inst, int (*send_bit)(void *inst), int samplerate, double bitrate, double f0, double f1, double level, int coherent, int filter);
void fsk_mod_cleanup(fsk_mod_t *fsk);
int fsk_mod_send(fsk_mod_t *fsk, sample_t *sample, int length, int add);
-void fsk_mod_tx_reset(fsk_mod_t *fsk);
+void fsk_mod_reset(fsk_mod_t *fsk);
int fsk_demod_init(fsk_demod_t *fsk, void *inst, void (*receive_bit)(void *inst, int bit, double quality, double level), int samplerate, double bitrate, double f0, double f1, double bitadjust);
void fsk_demod_cleanup(fsk_demod_t *fsk);
void fsk_demod_receive(fsk_demod_t *fsk, sample_t *sample, int length);