Skip to content

Commit 1a338d3

Browse files
authored
Merge pull request drowe67#235 from drowe67/dr-reliable-text
moved rx_sym callback to freedv_api_internal.h
2 parents acaed6b + 7a554ba commit 1a338d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/freedv_api.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ struct freedv_advanced {
145145

146146
// Called when text message char is decoded
147147
typedef void (*freedv_callback_rx)(void *, char);
148-
typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float);
149148
// Called when new text message char is needed
150149
typedef char (*freedv_callback_tx)(void *);
151150
typedef void (*freedv_calback_error_pattern)
@@ -212,7 +211,6 @@ int freedv_check_crc16_unpacked(unsigned char *unpacked_bits, int nbits);
212211
// Set parameters ------------------------------------------------------------
213212

214213
void freedv_set_callback_txt (struct freedv *freedv, freedv_callback_rx rx, freedv_callback_tx tx, void *callback_state);
215-
void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state);
216214
void freedv_set_callback_protocol (struct freedv *freedv, freedv_callback_protorx rx, freedv_callback_prototx tx, void *callback_state);
217215
void freedv_set_callback_data (struct freedv *freedv, freedv_callback_datarx datarx, freedv_callback_datatx datatx, void *callback_state);
218216
void freedv_set_test_frames (struct freedv *freedv, int test_frames);

src/freedv_api_internal.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,10 @@ int freedv_rx_fsk_ldpc_data(struct freedv *f, COMP demod_in[]);
230230

231231
int freedv_bits_to_speech(struct freedv *f, short speech_out[], short demod_in[], int rx_status);
232232

233+
// for the reliable text protocol we need to pass symbols back rather than text
234+
typedef void (*freedv_callback_rx_sym)(void *, _Complex float, float);
235+
void freedv_set_callback_txt_sym (struct freedv *freedv, freedv_callback_rx_sym rx, void *callback_state);
236+
233237
#ifdef __cplusplus
234238
}
235239
#endif

0 commit comments

Comments
 (0)