FreeCalypso > hg > ice1-trau-tester
changeset 18:61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 24 Jun 2024 07:26:20 +0000 |
parents | 42373f9992cc |
children | 1e375472d5a5 |
files | ater/Makefile ater/read_ts.c ater/tx_func.c |
diffstat | 3 files changed, 26 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ater/Makefile Mon Jun 24 07:20:17 2024 +0000 +++ b/ater/Makefile Mon Jun 24 07:26:20 2024 +0000 @@ -1,5 +1,5 @@ PROG= itt-ater-16 -OBJS= main.o read_ts.o record_ctrl.o subslot_rx.o user_cmd.o +OBJS= main.o read_ts.o record_ctrl.o subslot_rx.o tx_func.o user_cmd.o LIBUTIL=../libutil/libutil.a include ../config.defs
--- a/ater/read_ts.c Mon Jun 24 07:20:17 2024 +0000 +++ b/ater/read_ts.c Mon Jun 24 07:26:20 2024 +0000 @@ -31,6 +31,6 @@ if (record_file) fwrite(readbuf, 1, 160, record_file); osmo_i460_demux_in(&i460_ts, readbuf, 160); - /* transmit_e1_ts(); */ + transmit_e1_ts(); return 0; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ater/tx_func.c Mon Jun 24 07:26:20 2024 +0000 @@ -0,0 +1,24 @@ +/* + * Here we are going to implement Tx on Ater toward the TRAU. + */ + +#include <stdint.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> + +#include <osmocom/core/select.h> +#include <osmocom/isdn/i460_mux.h> + +#include "globals.h" +#include "submux.h" + +void transmit_e1_ts(void) +{ + uint8_t buf[160]; + + osmo_i460_mux_out(&i460_ts, buf, 160); + write(ts_fd, buf, 160); +}