comparison ater8/activate.c @ 48:3cc26391d24d

ater8: add support for data mode
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 13 Sep 2024 01:03:43 +0000
parents ff94d7fc5891
children
comparison
equal deleted inserted replaced
47:13fffc41f989 48:3cc26391d24d
56 return; 56 return;
57 } 57 }
58 58
59 /* good to proceed now */ 59 /* good to proceed now */
60 at->is_active = true; 60 at->is_active = true;
61 at->is_data = false;
61 init_trau_ul_frame(nr); 62 init_trau_ul_frame(nr);
62 at->ul_frame.c_bits[8] = dtxd; 63 at->ul_frame.c_bits[8] = dtxd;
63 trau_frame_from_record(init_frame, &at->ul_frame, &at->frame_has_taf); 64 trau_frame_from_record(init_frame, &at->ul_frame, &at->frame_has_taf);
64 free(init_frame); 65 free(init_frame);
66 }
67
68 void cmd_activate_csd(int argc, char **argv)
69 {
70 int nr;
71 struct ater_subslot *at;
72
73 if (argc != 2) {
74 usage: fprintf(stderr, "usage: %s 0-7\n", argv[0]);
75 return;
76 }
77 if (argv[1][0] < '0' || argv[1][0] > '7' || argv[1][1])
78 goto usage;
79 nr = argv[1][0] - '0';
80
81 at = &subslots[nr];
82 if (at->is_active) {
83 fprintf(stderr, "error: subslot %d is already active\n", nr);
84 return;
85 }
86
87 /* good to proceed now */
88 at->is_active = true;
89 at->is_data = true;
65 } 90 }
66 91
67 void cmd_deact(int argc, char **argv) 92 void cmd_deact(int argc, char **argv)
68 { 93 {
69 int nr; 94 int nr;