annotate rvinterf/asyncshell/at.c @ 923:10b4bed10192

gsm-fw/L1: fix for the DSP patch corruption bug The L1 code we got from the LoCosto fw contains a feature for DSP CPU load measurement. This feature is a LoCosto-ism, i.e., not applicable to earlier DBB chips (Calypso) with their respective earlier DSP ROMs. Most of the code dealing with that feature is conditionalized as #if (DSP >= 38), but one spot was missed, and the MCU code was writing into an API word dealing with this feature. In TCS211 this DSP API word happens to be used by the DSP code patch, hence that write was corrupting the patched DSP code.
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 19 Oct 2015 17:13:56 +0000
parents 4661b84260a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
879
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /*
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 * Functions for the AT-over-RVTMUX interface
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 */
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 #include <sys/types.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 #include <stdio.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 #include <ctype.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 #include <string.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9 #include <strings.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 #include <stdlib.h>
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 #include "pktmux.h"
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "limits.h"
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 send_string_to_ati(str)
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 char *str;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 {
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17 unsigned len;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 u_char sendpkt[MAX_PKT_TO_TARGET+1];
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 len = strlen(str);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 if (len + 1 > MAX_PKT_TO_TARGET) {
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 printf("error: max pkt to target limit exceeded\n");
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 return(1);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 }
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 /* fill out the packet */
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 sendpkt[0] = RVT_AT_HEADER;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 strcpy(sendpkt + 1, str);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28 /* send it! */
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 send_pkt_to_target(sendpkt, len + 1);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 return(0);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 }
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 void
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34 cmd_sendat(arg)
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 char *arg;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36 {
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 while (isspace(*arg))
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38 arg++;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 if (!*arg) {
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 printf("error: missing string argument\n");
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41 return;
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 }
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43 ati_rx_control(1);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 send_string_to_ati(arg);
4661b84260a0 fc-shell: AT-over-RVTMUX command sending implemented
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45 }