dump init function rename, some cleanup

pull/13/head^2
Joseph Poirier 2015-08-14 11:38:17 -05:00
rodzic 657010cbe6
commit d492c80b72
3 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -29,10 +29,9 @@ var PackageVersion = "v0.1"
type UserCbT func(C.char, *C.uint8_t, C.int) type UserCbT func(C.char, *C.uint8_t, C.int)
// SetCallback must be the first function called in this package; // Dump978Init must be the first function called in this package.
// it sets dump978's callback for demodulated data. func Dump978Init() {
func SetCallback(cb UserCbT, ch chan []byte) { C.Dump978Init((C.CallBack)(C.get_go_cb()))
C.init((C.CallBack)(C.get_go_cb()))
} }
// ProcessData passes buf (modulated data) to dump978 for demodulation. // ProcessData passes buf (modulated data) to dump978 for demodulation.

Wyświetl plik

@ -71,7 +71,7 @@ int main(int argc, char **argv)
} }
#else #else
static CallBack userCB = NULL; static CallBack userCB = NULL;
void init(CallBack cb) void Dump978Init(CallBack cb)
{ {
make_atan2_table(); make_atan2_table();
init_fec(); init_fec();

Wyświetl plik

@ -6,7 +6,7 @@
typedef void (*CallBack)(char updown, uint8_t *data, int len); typedef void (*CallBack)(char updown, uint8_t *data, int len);
extern void init(CallBack cb); extern void Dump978Init(CallBack cb);
extern int process_data(char *data, int dlen); extern int process_data(char *data, int dlen);
#endif /* DUMP978_H */ #endif /* DUMP978_H */