FreeCalypso > hg > ice1-trau-tester
annotate ater/tx_func.c @ 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 | |
children | 1e375472d5a5 |
rev | line source |
---|---|
18
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * Here we are going to implement Tx on Ater toward the TRAU. |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 */ |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 #include <stdint.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include <stdbool.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include <stdio.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include <stdlib.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include <string.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include <unistd.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 #include <osmocom/core/select.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include <osmocom/isdn/i460_mux.h> |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 #include "globals.h" |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 #include "submux.h" |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 void transmit_e1_ts(void) |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 { |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 uint8_t buf[160]; |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 osmo_i460_mux_out(&i460_ts, buf, 160); |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 write(ts_fd, buf, 160); |
61862af2247f
ater: E1 timeslot output (osmo_i460 mux)
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 } |