comparison rvinterf/asyncshell/rxctl.c @ 1011:820d34f3f3d7

fc-shell: added ability to receive and dump TCH packets
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 20 Mar 2016 21:10:21 +0000
parents c9f353b5d70c
children
comparison
equal deleted inserted replaced
1010:658fe6f1880f 1011:820d34f3f3d7
43 send_rxctl_cmd(RVT_L23_HEADER, newstate); 43 send_rxctl_cmd(RVT_L23_HEADER, newstate);
44 state = newstate; 44 state = newstate;
45 } 45 }
46 46
47 void 47 void
48 tch_rx_control(newstate)
49 {
50 static int state = 0;
51
52 if (state == newstate)
53 return;
54 send_rxctl_cmd(RVT_TCH_HEADER, newstate);
55 state = newstate;
56 }
57
58 void
48 rxctl_user_cmd(args, enable) 59 rxctl_user_cmd(args, enable)
49 char *args; 60 char *args;
50 { 61 {
51 char *cp, *np; 62 char *cp, *np;
52 int gotsome = 0; 63 int gotsome = 0;
65 *cp++ = '\0'; 76 *cp++ = '\0';
66 if (!strcmp(np, "ati")) 77 if (!strcmp(np, "ati"))
67 ati_rx_control(enable); 78 ati_rx_control(enable);
68 else if (!strcmp(np, "gpf")) 79 else if (!strcmp(np, "gpf"))
69 gpf_rx_control(enable); 80 gpf_rx_control(enable);
81 else if (!strcmp(np, "tch"))
82 tch_rx_control(enable);
70 else { 83 else {
71 printf("error: unknown channel \"%s\"\n", np); 84 printf("error: unknown channel \"%s\"\n", np);
72 return; 85 return;
73 } 86 }
74 gotsome++; 87 gotsome++;