annotate nuc-fw/serial/init.c @ 119:dd56546ad9e0

starting to compile RVF
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Wed, 30 Oct 2013 23:19:21 +0000
parents e40d8661ecab
children 789a9a95533f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 /*
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 * Default configuration: for now we always set it
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 * to the "standard" 0x0168; later we may add
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 * compile-time conditionals based on FreeCalypso
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 * configuration magic.
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 UART_MODEM_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 UART_IRDA_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 DUMMY_TRACE}, // default config = 0x0168
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #ifdef BTEMOBILE
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 12, // 12 serial config allowed
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #else // BTEMOBILE
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 9, // 9 serial config allowed
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 {
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 // Configs with Condat Panel only
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 DUMMY_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 UART_IRDA_TRACE}, // 0x1048
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 DUMMY_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 UART_MODEM_TRACE}, // 0x2048
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 // 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
49 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 UART_IRDA_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 DUMMY_TRACE}, // 0x0148
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 UART_MODEM_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 DUMMY_TRACE}, // 0x0248
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 // Configs with AT-Cmd only
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 UART_MODEM_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 DUMMY_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 DUMMY_TRACE}, // 0x0068
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 // 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
63 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 UART_MODEM_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 UART_IRDA_TRACE}, // 0x1248
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 UART_IRDA_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 UART_MODEM_TRACE}, // 0x2148
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 // 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
72 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 UART_MODEM_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 DUMMY_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 UART_IRDA_TRACE}, // 0x1068
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #ifdef BTEMOBILE
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 // 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
78 {UART_IRDA_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 UART_MODEM_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 DUMMY_TRACE}, // 0x0249
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 {UART_MODEM_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 DUMMY_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 UART_IRDA_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 DUMMY_TRACE}, // 0x014A
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 // 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
87 {UART_IRDA_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 UART_MODEM_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 DUMMY_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 DUMMY_TRACE}, // 0x0069
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #endif // BTEMOBILE
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 // 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
93 {DUMMY_BT_HCI,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
94 UART_MODEM_FAX_DATA,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 UART_IRDA_TRACE,
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 DUMMY_TRACE} // 0x0168
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 }
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 };
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 /*
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 * Init_Serial_Flows
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 *
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 * 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
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 void Init_Serial_Flows (void)
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 #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
109
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110 /*
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111 * Initialize Serial Switch module.
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 #if ((BOARD==35) || (BOARD == 46))
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 SER_InitSerialConfig (GC_GetSerialConfig());
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #else
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 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
117 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 /*
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 * 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
120 * - 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
121 * - AT-Cmd/Fax & Data Flow
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 *
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 * 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
124 * by the appropriate SW Entities.
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 * 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
127 */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 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
129
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 /*
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 * 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
132 */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 #if ((BOARD != 35) && (BOARD != 46))
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 (void) SER_fd_Initialize ();
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 #else /* OP_L1_STANDALONE */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 #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
140 #if ((BOARD == 35) || (BOARD == 46))
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 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
142 #else
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 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
144 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 #if (CHIPSET !=15)
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 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
147 #else
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] = '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
149 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 /* init Uart Modem */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 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
153
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 #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
155 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
156
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 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
158 #else
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 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
160 #endif
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162 L1_trace_string(" \n\r");
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 #endif /* TRACE_TYPE */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166 #endif /* OP_L1_STANDALONE */
e40d8661ecab nuc-fw: low-level serial code should be complete
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 }