FreeCalypso > hg > ice1-trau-tester
diff abis/main.c @ 32:94f11dc0d474
abis: Rx osmo_trau_sync hooked in
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Tue, 13 Aug 2024 22:07:49 +0000 |
| parents | 5dd30224b70a |
| children |
line wrap: on
line diff
--- a/abis/main.c Tue Aug 13 21:44:30 2024 +0000 +++ b/abis/main.c Tue Aug 13 22:07:49 2024 +0000 @@ -20,6 +20,7 @@ #include <osmocom/core/application.h> #include <osmocom/e1d/proto_clnt.h> #include <osmocom/isdn/i460_mux.h> +#include <osmocom/trau/trau_sync.h> #include "../libutil/open_ts.h" #include "../libutil/stdin_handler.h" @@ -81,6 +82,18 @@ } } +static void setup_rx_sync(void) +{ + int nr; + + for (nr = 0; nr < ABIS_SUBSLOTS; nr++) { + subslots[nr].sync = osmo_trau_sync_alloc(g_ctx, "TRAU-UL-sync", + sync_rx_func, OSMO_TRAU_SYNCP_16_FR_EFR, + subslots + nr); + OSMO_ASSERT(subslots[nr].sync); + } +} + int main(int argc, char **argv) { process_cmdline(argc, argv); @@ -98,6 +111,7 @@ osmo_i460_ts_init(&i460_ts); register_subslots(); + setup_rx_sync(); init_canned_dl_frames(); osmo_fd_setup(&ts_ofd, ts_fd, OSMO_FD_READ, ts_fd_cb, NULL, 0);
