FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/serial/init.c @ 547:32f7494783db
L1: l1_api_hisr.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 03 Aug 2014 07:07:24 +0000 |
parents | afceeeb2cba1 |
children |
rev | line source |
---|---|
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 #include "../include/config.h" |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 #include "../include/sys_types.h" |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #include "serialswitch.h" |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 #include <string.h> |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 * Serial Configuration set up. |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 ** One config is: |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 ** {XXX_BT_HCI, // Bluetooth HCI |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 ** XXX_FAX_DATA, // Fax/Data AT-Cmd |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 ** XXX_TRACE, // L1/Riviera Trace Mux |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 ** XXX_TRACE}, // Trace PS |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 ** |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 ** with XXX being DUMMY, UART_IRDA or UART_MODEM |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 const T_AppliSerialInfo appli_ser_cfg_info = { |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 /* |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
24 * Default configuration: set it to the "standard" |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
25 * 0x0168, unless the RVTMUX serial channel has been |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
26 * moved to the MODEM UART. |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 */ |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
28 #if CONFIG_RVTMUX_ON_MODEM |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
29 {DUMMY_BT_HCI, |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
30 DUMMY_FAX_DATA, |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
31 UART_MODEM_TRACE, |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
32 DUMMY_TRACE}, // 0x0248 |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
33 #else |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 UART_MODEM_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 UART_IRDA_TRACE, |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
37 DUMMY_TRACE}, // default config = 0x0168 |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
38 #endif |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
39 /* number of possible configs */ |
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
40 #ifdef BTEMOBILE |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 12, // 12 serial config allowed |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
42 #else // BTEMOBILE |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 9, // 9 serial config allowed |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
44 #endif |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 { |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 // Configs with Condat Panel only |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 DUMMY_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 UART_IRDA_TRACE}, // 0x1048 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 DUMMY_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 UART_MODEM_TRACE}, // 0x2048 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 // Configs with L1/Riviera Trace only |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 UART_IRDA_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 DUMMY_TRACE}, // 0x0148 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 UART_MODEM_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 DUMMY_TRACE}, // 0x0248 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 // Configs with AT-Cmd only |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 UART_MODEM_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 DUMMY_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 DUMMY_TRACE}, // 0x0068 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 // Configs with Condat Panel and L1/Riviera Trace |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 UART_MODEM_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 UART_IRDA_TRACE}, // 0x1248 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 UART_IRDA_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 UART_MODEM_TRACE}, // 0x2148 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 // Configs with Condat Panel and AT-Cmd |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 UART_MODEM_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 DUMMY_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 UART_IRDA_TRACE}, // 0x1068 |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
83 #ifdef BTEMOBILE |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 // Configs with L1/Riviera Trace and Bluetooth HCI |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 {UART_IRDA_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 UART_MODEM_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 DUMMY_TRACE}, // 0x0249 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 {UART_MODEM_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 DUMMY_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 UART_IRDA_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 DUMMY_TRACE}, // 0x014A |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 // Configs with AT-Cmd and Bluetooth HCI |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 {UART_IRDA_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 UART_MODEM_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 DUMMY_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 DUMMY_TRACE}, // 0x0069 |
128
789a9a95533f
nuc-fw: more minor preparations for the big transition
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
117
diff
changeset
|
98 #endif // BTEMOBILE |
117
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 // Configs with L1/Riviera Trace and AT-Cmd |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 {DUMMY_BT_HCI, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 UART_MODEM_FAX_DATA, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 UART_IRDA_TRACE, |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 DUMMY_TRACE} // 0x0168 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 } |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 }; |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 * Init_Serial_Flows |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 * |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 * Performs Serialswitch + related serial data flows initialization. |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 void Init_Serial_Flows (void) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 { |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 #if 1 //(OP_L1_STANDALONE == 0) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 * Initialize Serial Switch module. |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 #if ((BOARD==35) || (BOARD == 46)) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 SER_InitSerialConfig (GC_GetSerialConfig()); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 #else |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 SER_InitSerialConfig (&appli_ser_cfg_info); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 #endif |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 * Then Initialize the Serial Data Flows and the associated UARTs: |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 * - G2-3 Trace if GSM/GPRS Protocol Stack |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 * - AT-Cmd/Fax & Data Flow |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 * |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 * Layer1/Riviera Trace Flow and Bluetooth HCI Flow are initialized |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 * by the appropriate SW Entities. |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 * |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 * G2-3 Trace => No more Used |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 SER_tr_Init(SER_PROTOCOL_STACK, TR_BAUD_38400, NULL); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 /* |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 * Fax & Data / AT-Command Interpreter Serial Data Flow Initialization |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 #if ((BOARD != 35) && (BOARD != 46)) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 (void) SER_fd_Initialize (); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 #endif |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 #else /* OP_L1_STANDALONE */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 #if (TESTMODE || (TRACE_TYPE==1) || (TRACE_TYPE==2) || (TRACE_TYPE==3) || (TRACE_TYPE==6) || (TRACE_TYPE==7)) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 #if ((BOARD == 35) || (BOARD == 46)) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 ser_cfg_info[UA_UART_0] = '0'; |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 #else |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 ser_cfg_info[UA_UART_0] = 'G'; |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 #endif |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 #if (CHIPSET !=15) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 ser_cfg_info[UA_UART_1] = 'R'; // Riviear Demux on UART MODEM |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 #else |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 ser_cfg_info[UA_UART_0] = 'R'; // Riviear Demux on UART MODEM |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 #endif |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 /* init Uart Modem */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 SER_InitSerialConfig (&appli_ser_cfg_info); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 #if TESTMODE || (TRACE_TYPE == 1) || (TRACE_TYPE == 7) |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 SER_tr_Init (SER_LAYER_1, TR_BAUD_115200, rvt_activate_RX_HISR); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 rvt_register_id("OTHER",&trace_id,(RVT_CALLBACK_FUNC)NULL); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 #else |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 SER_tr_Init (SER_LAYER_1, TR_BAUD_38400, NULL); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 #endif |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 L1_trace_string(" \n\r"); |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 #endif /* TRACE_TYPE */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 #endif /* OP_L1_STANDALONE */ |
e40d8661ecab
nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 } |