kopia lustrzana https://github.com/cyoung/stratux
dump init function rename, some cleanup
rodzic
657010cbe6
commit
d492c80b72
|
@ -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.
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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 */
|
||||||
|
|
Ładowanie…
Reference in New Issue