diff --git a/dump978.go b/dump978.go index f577fc90..c2a52c50 100644 --- a/dump978.go +++ b/dump978.go @@ -29,10 +29,9 @@ var PackageVersion = "v0.1" type UserCbT func(C.char, *C.uint8_t, C.int) -// SetCallback must be the first function called in this package; -// it sets dump978's callback for demodulated data. -func SetCallback(cb UserCbT, ch chan []byte) { - C.init((C.CallBack)(C.get_go_cb())) +// Dump978Init must be the first function called in this package. +func Dump978Init() { + C.Dump978Init((C.CallBack)(C.get_go_cb())) } // ProcessData passes buf (modulated data) to dump978 for demodulation. diff --git a/dump978/dump978.c b/dump978/dump978.c index 77ddbf4e..4494280a 100644 --- a/dump978/dump978.c +++ b/dump978/dump978.c @@ -71,7 +71,7 @@ int main(int argc, char **argv) } #else static CallBack userCB = NULL; -void init(CallBack cb) +void Dump978Init(CallBack cb) { make_atan2_table(); init_fec(); diff --git a/dump978/dump978.h b/dump978/dump978.h index bcc0d991..7942c109 100644 --- a/dump978/dump978.h +++ b/dump978/dump978.h @@ -6,7 +6,7 @@ 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); #endif /* DUMP978_H */