FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/serial/debug-chases/serialswitch.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 | ae254ffeaec3 |
children |
rev | line source |
---|---|
853
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * SERIALSWITCH.C |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * This module allows managing the use of the serial ports of TI GSM Evaluation |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * Boards. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * An application may have to send several serial data flows. The board on which |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 * the application is running may have one or several devices. The purpose of |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 * this module is to establish connections between the serial data flows and the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * serial devices at runtime, when the application is started. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 * (C) Texas Instruments 1999 - 2003 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 #define __SERIALSWITCH_C__ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #define __STANDARD_H__ /* Avoid to define UBYTE, SYS_UWORD16 and UINT32. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 #include "../include/config.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #include "../include/sys_types.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 #include "../riviera/rv/rv_general.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #include "../riviera/rvf/rvf_api.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #include "../nucleus/nucleus.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 #include "serialswitch.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #include "uart.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include "uartfax.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include "../bsp/mem.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include <string.h> /* needed for memcmp & memset */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #include "ffs/ffs.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #include "rvf/rvf_api.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #include "inth/iq.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 #include "rvt/rvt_def_i.h" /* needed for Riviera/Layer1 Trace's callback function */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #if defined(BTEMOBILE) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #include "hci_ser.h" |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #define DUMMY_DEVICE (0) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #define IIR (0x02) /* UART interrupt ident. register - Read only */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #define SCR (0x10) /* UART suppl. control register - Read/Write */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #define SSR (0x11) /* UART suppl. status register - Read only */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 * Interrupt identification register. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 * Bit 0 is set to 0 if an IT is pending. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 * Bits 1 and 2 are used to identify the IT. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #define IIR_BITS_USED (0x07) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 #define IT_NOT_PENDING (0x01) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 * Supplementary Control Register |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #define RX_CTS_WAKE_UP_ENABLE_BIT (4) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 * Supplementary Status Register |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 #define RX_CTS_WAKE_UP_STS (0x02) /* Wake-up interrupt occurred */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 * This macro allows to read an UART register. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 #define READ_UART_REGISTER(UART,REG) \ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 *((volatile SYS_UWORD8 *) ((UART)->base_address + (REG))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 * This macro allows to disable the UART's wake-up interrupt. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 #define DISABLE_WAKE_UP_INTERRUPT(UART) \ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 *((volatile SYS_UWORD8 *) ((UART)->base_address + SCR)) &= \ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 ~(1 << (RX_CTS_WAKE_UP_ENABLE_BIT)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 * Wake-up time duration in seconds and in number of TDMAs. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 * 1 TDMA = (6 / 1300) s = 0.004615 s (= 4.615 ms). |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 #define WAKE_UP_TIME_DURATION (10) /* 10 seconds */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 #define WAKE_UP_TIME_IN_TDMA (WAKE_UP_TIME_DURATION * 1300 / 6) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 * Global uartswitch variable as read from FFS. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 * It is supposed that NUMBER_OF_TR_UART, NUMBER_OF_FD_UART |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 * and NUMBER_OF_BT_UART have the same values. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 #define DUMMY ('0') |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 #define G23_PANEL ('G') |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 #define RIVIERA_TRACE_MUX ('R') |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 #define FD_AT_COMMAND ('D') |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 #define BLUETOOTH_HCI ('B') |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 char ser_cfg_info[NUMBER_OF_TR_UART] = {DUMMY, DUMMY, DUMMY}; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 char ser_cfg_info[NUMBER_OF_TR_UART] = {DUMMY, DUMMY}; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 static SYS_UWORD16 serial_cfg = 0x0048; /* All dummies */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 * Global variables used for Dynamic Switch. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 static char ser_new_cfg[NUMBER_OF_TR_UART] = {DUMMY, DUMMY}; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 const static char uart_config_file[] = "/sys/uartswitch"; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 static SYS_BOOL dynamic_switch = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 /* Import Serial Info structure. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 extern T_AppliSerialInfo appli_ser_cfg_info; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 * Types of flows supported. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 typedef enum { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 TRACE_FLOW, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 FAX_DATA_FLOW, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 BLUETOOTH_HCI_FLOW |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 } t_flow_type; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 * For each serial data flow, a set of function pointers allows calling the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 * functions associated to a serial device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 typedef struct s_tr_functions { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 T_tr_UartId device; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 void (*tr_Init) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 T_tr_Baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 void (callback_function (void))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 SYS_UWORD32 (*tr_ReadNChars) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 SYS_UWORD32 chars_to_read); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 SYS_UWORD32 (*tr_ReadNBytes) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 SYS_UWORD32 chars_to_read, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 SYS_BOOL *eof_detected); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 SYS_UWORD32 (*tr_WriteNChars) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 SYS_UWORD32 (*tr_EncapsulateNChars) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 SYS_UWORD32 (*tr_WriteNBytes) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 SYS_UWORD8 *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 void (*tr_WriteChar) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 char character); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 void (*tr_WriteString) (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 char *buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 SYS_BOOL (*tr_EnterSleep) (T_tr_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 void (*tr_WakeUp) (T_tr_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 } t_tr_functions; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 * Set of function pointers for fax & data functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 typedef struct s_fd_functions { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 T_fd_UartId device; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 T_FDRET (*fd_Initialize) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 T_FDRET (*fd_Enable) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 SYS_BOOL enable); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 T_FDRET (*fd_SetComPar) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 T_baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 T_bitsPerCharacter bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 T_stopBits sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 T_parity parity); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 T_FDRET (*fd_SetBuffer) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 SYS_UWORD16 bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 SYS_UWORD16 rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 SYS_UWORD16 txThreshold); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 T_FDRET (*fd_SetFlowCtrl) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 T_flowCtrlMode fcMode, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 SYS_UWORD8 XON, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 SYS_UWORD8 XOFF); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 T_FDRET (*fd_SetEscape) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 SYS_UWORD8 escChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 SYS_UWORD16 guardPeriod); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 T_FDRET (*fd_InpAvail) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 T_FDRET (*fd_OutpAvail) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 T_FDRET (*fd_EnterSleep) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 T_FDRET (*fd_WakeUp) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 T_FDRET (*fd_ReadData) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 void (readOutFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 SYS_UWORD32 state))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 T_FDRET (*fd_WriteData) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 void (writeInFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 SYS_UWORD16 size[]))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 T_FDRET (*fd_StopRec) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 T_FDRET (*fd_StartRec) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 T_FDRET (*fd_GetLineState) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 SYS_UWORD32 *state); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 T_FDRET (*fd_SetLineState) (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 SYS_UWORD32 state, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 SYS_UWORD32 mask); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 T_FDRET (*fd_CheckXEmpty) (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 } t_fd_functions; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 * Set of function pointers for Bluetooth HCI functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 typedef struct s_bt_functions { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 T_bt_UartId device; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 T_HCI_RET (*bt_Init) (T_bt_UartId uart_device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 T_HCI_RET (*bt_Start) (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 T_HCI_RET (*bt_Stop) (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 T_HCI_RET (*bt_Kill) (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 T_HCI_RET (*bt_SetBaudrate) (UINT8 baudrate); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 T_HCI_RET (*bt_TransmitPacket) (void *uart_tx_buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 SYS_BOOL (*bt_EnterSleep) (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 void (*bt_WakeUp) (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 } t_bt_functions; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 * Prototypes of dummy functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 * Dummy functions for Trace. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 static void dummy_tr_Init (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 T_tr_Baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 void (callback_function (void))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 static SYS_UWORD32 dummy_tr_ReadNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 SYS_UWORD32 chars_to_read); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 static SYS_UWORD32 dummy_tr_ReadNBytes (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 SYS_UWORD32 chars_to_read, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 SYS_BOOL *eof_detected); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 static SYS_UWORD32 dummy_tr_WriteNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 static SYS_UWORD32 dummy_tr_EncapsulateNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 static SYS_UWORD32 dummy_tr_WriteNBytes (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 SYS_UWORD8 *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 SYS_UWORD32 chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 static void dummy_tr_WriteChar (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 char character); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 static void dummy_tr_WriteString (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 char *buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 static SYS_BOOL dummy_tr_EnterSleep (T_tr_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 static void dummy_tr_WakeUp (T_tr_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 * Dummy functions for Fax & Data. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 static T_FDRET dummy_fd_Init (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 static T_FDRET dummy_fd_Enable (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 SYS_BOOL enable); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 static T_FDRET dummy_fd_SetComPar (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 T_baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 T_bitsPerCharacter bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 T_stopBits sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 T_parity parity); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 static T_FDRET dummy_fd_SetBuffer (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 SYS_UWORD16 bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 SYS_UWORD16 rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 SYS_UWORD16 txThreshold); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 static T_FDRET dummy_fd_SetFlowCtrl (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 T_flowCtrlMode fcMode, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 SYS_UWORD8 XON, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 SYS_UWORD8 XOFF); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 static T_FDRET dummy_fd_SetEscape (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 SYS_UWORD8 escChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 SYS_UWORD16 guardPeriod); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 static T_FDRET dummy_fd_InpAvail (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 static T_FDRET dummy_fd_OutpAvail (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 static T_FDRET dummy_fd_EnterSleep (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 static T_FDRET dummy_fd_WakeUp (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 static T_FDRET dummy_fd_ReadData (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 void (readOutFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 SYS_UWORD32 state))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 static T_FDRET dummy_fd_WriteData (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 void (writeInFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 SYS_UWORD16 size[]))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 static T_FDRET dummy_fd_StopRec (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 static T_FDRET dummy_fd_StartRec (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 static T_FDRET dummy_fd_GetLineState (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 SYS_UWORD32 *state); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 static T_FDRET dummy_fd_SetLineState (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 SYS_UWORD32 state, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 SYS_UWORD32 mask); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 static T_FDRET dummy_fd_CheckXEmpty (T_fd_UartId device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 * Dummy functions for Bluetooth HCI. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 static T_HCI_RET dummy_bt_Init (T_bt_UartId uart_device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 static T_HCI_RET dummy_bt_Start (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 static T_HCI_RET dummy_bt_Stop (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 static T_HCI_RET dummy_bt_Kill (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 static T_HCI_RET dummy_bt_SetBaudrate (UINT8 baudrate); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 static T_HCI_RET dummy_bt_TransmitPacket (void *uart_tx_buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 static SYS_BOOL dummy_bt_EnterSleep (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 static void dummy_bt_WakeUp (void); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 * Constants tables representing the various possible configurations |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 * for Trace, Fax & Data and Bluetooth HCI according to the different devices. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 * Constant table for Trace using no device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 static const t_tr_functions dummy_trace = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 DUMMY_DEVICE, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 dummy_tr_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 dummy_tr_ReadNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 dummy_tr_ReadNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 dummy_tr_WriteNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 dummy_tr_EncapsulateNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 dummy_tr_WriteNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 dummy_tr_WriteChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 dummy_tr_WriteString, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 dummy_tr_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 dummy_tr_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 * Constant table for Trace using UART IrDA. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 static const t_tr_functions uart_irda_trace = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 UA_UART_0, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 UA_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 UA_ReadNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 UA_ReadNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 UA_WriteNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 UA_EncapsulateNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 UA_WriteNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 UA_WriteChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 UA_WriteString, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 UA_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 UA_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 * Constant table for Trace using UART Modem. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 static const t_tr_functions uart_modem_trace = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 UA_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 UA_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 UA_ReadNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 UA_ReadNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 UA_WriteNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 UA_EncapsulateNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 UA_WriteNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 UA_WriteChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 UA_WriteString, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 UA_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 UA_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 * Constant table for Trace using UART Modem2. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 static const t_tr_functions uart_modem2_trace = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 UA_UART_2, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 UA_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 UA_ReadNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 UA_ReadNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 UA_WriteNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 UA_EncapsulateNChars, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 UA_WriteNBytes, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 UA_WriteChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 UA_WriteString, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 UA_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 UA_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 * Constant table for Fax & Data using no device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 static const t_fd_functions dummy_fax_data = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 DUMMY_DEVICE, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 dummy_fd_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 dummy_fd_Enable, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 dummy_fd_SetComPar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 dummy_fd_SetBuffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 dummy_fd_SetFlowCtrl, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 dummy_fd_SetEscape, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 dummy_fd_InpAvail, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 dummy_fd_OutpAvail, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 dummy_fd_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 dummy_fd_WakeUp, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 dummy_fd_ReadData, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 dummy_fd_WriteData, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 dummy_fd_StopRec, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 dummy_fd_StartRec, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 dummy_fd_GetLineState, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 dummy_fd_SetLineState, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 dummy_fd_CheckXEmpty |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 * Constant table for Fax & Data using UART Modem. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 #if CONFIG_FDMODEM |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 static const t_fd_functions uart_modem_fax_data = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 UAF_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 UAF_Enable, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 UAF_SetComPar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 UAF_SetBuffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 UAF_SetFlowCtrl, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 UAF_SetEscape, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 UAF_InpAvail, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 UAF_OutpAvail, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 UAF_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 UAF_WakeUp, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 UAF_ReadData, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 UAF_WriteData, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 UAF_StopRec, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 UAF_StartRec, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 UAF_GetLineState, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 UAF_SetLineState, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 UAF_CheckXEmpty |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 * Constant table for BT HCI using no device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 static const t_bt_functions dummy_bt_hci = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 DUMMY_DEVICE, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 dummy_bt_Init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 dummy_bt_Start, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 dummy_bt_Stop, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 dummy_bt_Kill, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 dummy_bt_SetBaudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 dummy_bt_TransmitPacket, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 dummy_bt_EnterSleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 dummy_bt_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 * Constant table for BT HCI using UART IrDA. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 static const t_bt_functions uart_irda_bt_hci = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 UABT_UART_0, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 hciu_init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 hciu_start, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 hciu_stop, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 hciu_kill, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 hciu_set_baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 hciu_transmit_packet, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 hciu_enter_sleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 hciu_wakeup |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 * Constant table for BT HCI using UART Modem. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 static const t_bt_functions uart_modem_bt_hci = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 UABT_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 hciu_init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 hciu_start, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 hciu_stop, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 hciu_kill, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 hciu_set_baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 hciu_transmit_packet, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 hciu_enter_sleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 hciu_wakeup |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 * Constant table for BT HCI using UART Modem2. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 static const t_bt_functions uart_modem2_bt_hci = { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 UABT_UART_2, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 hciu_init, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 hciu_start, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 hciu_stop, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 hciu_kill, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 hciu_set_baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 hciu_transmit_packet, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 hciu_go_to_sleep, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 hciu_wakeup |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
625 * Structure used to store initialization parameters related to the AT-Cmd/F&D flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
626 * Numbers of paramaters (in case of multiple calls) have been figured out from |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
627 * Condat AT-Command/F&D flow initialization. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
628 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
629 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
630 typedef struct s_data_flow { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
631 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
632 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
633 * Parameters related to SER_fd_SetComPar (2 calls) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
634 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
635 T_baudrate baudrate[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
636 T_bitsPerCharacter bpc[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
637 T_stopBits sb[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
638 T_parity parity[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
639 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
640 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
641 * Parameters related to SER_fd_SetBuffer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
642 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
643 SYS_WORD16 bufSize; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
644 SYS_WORD16 rxThreshold; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
645 SYS_WORD16 txThreshold; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
646 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
647 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
648 * Parameters related to SER_fd_SetFlowCtrl (2 calls) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
649 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
650 T_flowCtrlMode fcMode[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
651 SYS_UWORD8 XON[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
652 SYS_UWORD8 XOFF[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
653 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
654 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
655 * Parameters related to SER_fd_SetEscape (2 calls) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
656 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
657 SYS_UWORD8 escChar[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
658 SYS_UWORD16 guardPeriod[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
659 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
660 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
661 * Parameters related to SER_fd_SetLineState (4 calls) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
662 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
663 SYS_UWORD32 state[4]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
664 SYS_UWORD32 mask[4]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
665 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
666 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
667 * Parameters related to SER_fd_ReadData |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
668 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
669 T_suspendMode suspend_rd; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
670 void (*readOutFunc) (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
671 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
672 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
673 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
674 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
675 SYS_UWORD32 state); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
676 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
677 * Parameters related to SER_fd_WriteData |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
678 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
679 T_suspendMode suspend_wr; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
680 void (*writeInFunc) (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
681 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
682 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
683 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
684 SYS_UWORD16 size[]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
685 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
686 } t_data_flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
687 #endif /* (defined BTEMOBILE && (CHIPSET != 12)) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
688 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
689 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
690 * UART structure used for UARTs. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
691 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
692 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
693 typedef struct s_uart { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
694 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
695 SYS_UWORD32 base_address; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
696 SYS_BOOL device_used; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
697 SYS_BOOL deep_sleep_set_up; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
698 t_flow_type flow_type; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
699 SYS_WORD16 flow_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
700 void (*interrupt_handler) (int uart_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
701 SYS_UWORD8 interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
702 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
703 } t_uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
704 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
705 static const t_tr_functions *tr_functions[SER_MAX_NUMBER_OF_FLOWS]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
706 static const t_fd_functions *fd_functions; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
707 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
708 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
709 static const t_bt_functions *bt_functions; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
710 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
711 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
712 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
713 static SYS_BOOL uart_fd_initialized = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
714 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
715 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
716 static SYS_UWORD8 fd_buffer[FD_MAX_BUFFER_SIZE]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
717 static SYS_BOOL fd_driver_enabled; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
718 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
719 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
720 static t_data_flow data_flow_parameters; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
721 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
722 static SYS_WORD16 bufSize; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
723 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
724 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
725 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
726 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
727 * Variables used to count calls to SER_fd_XXX functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
728 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
729 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
730 static SYS_UWORD8 fd_UAF_SetBuffer = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
731 static SYS_UWORD8 fd_UAF_SetEscape = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
732 static SYS_UWORD8 fd_UAF_SetComPar = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
733 static SYS_UWORD8 fd_UAF_SetFlowCtrl = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
734 static SYS_UWORD8 fd_UAF_ReadData = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
735 static SYS_UWORD8 fd_UAF_SetLineState = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
736 static SYS_UWORD8 fd_UAF_WriteData = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
737 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
738 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
739 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
740 * Timer used for duration control when UARTs are waked up by an interrupt or |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
741 * each time any new incoming characters are received; This timer prevents the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
742 * system to enter deep sleep mode. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
743 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
744 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
745 static NU_TIMER uart_sleep_timer; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
746 SYS_BOOL uart_sleep_timer_enabled; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
747 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
748 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
749 * HISR used to reset and restart the sleep timer from an UART use by a Trace |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
750 * flow in case of incoming characters. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
751 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
752 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
753 #define TIMER_HISR_PRIORITY (2) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
754 #define TIMER_HISR_STACK_SIZE (512) /* Bytes. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
755 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
756 static NU_HISR timer_hisr_ctrl_block; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
757 static char timer_hisr_stack[TIMER_HISR_STACK_SIZE]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
758 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
759 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
760 * For next arrays, it is supposed that NUMBER_OF_TR_UART, NUMBER_OF_FD_UART |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
761 * and NUMBER_OF_BT_UART have the same values. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
762 * An index on an internal uart for trace, fax & data or bluetooth hci reffers |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
763 * to the same uart device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
764 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
765 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
766 static t_uart int_uart[NUMBER_OF_TR_UART]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
767 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
768 #if ((CHIPSET == 2) || (CHIPSET == 3)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
769 static SYS_UWORD32 uart_spurious_interrupts; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
770 #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
771 static SYS_UWORD32 uart_modem_spurious_interrupts; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
772 static SYS_UWORD32 uart_irda_spurious_interrupts; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
773 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
774 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
775 static SYS_UWORD32 uart_modem2_spurious_interrupts; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
776 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
777 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
778 static const SYS_UWORD32 uart_base_address[NUMBER_OF_TR_UART] = |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
779 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
780 MEM_UART_IRDA, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
781 MEM_UART_MODEM |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
782 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
783 , MEM_UART_MODEM2 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
784 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
785 }; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
786 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
787 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
788 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
789 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
790 * dummy_tr_Init |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
791 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
792 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
793 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
794 * Parameters: See SER_tr_Init. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
795 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
796 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
797 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
798 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
799 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
800 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
801 dummy_tr_Init (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
802 T_tr_Baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
803 void (callback_function (void))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
804 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
805 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
806 * No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
807 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
808 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
809 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
810 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
811 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
812 * dummy_tr_ReadNChars |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
813 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
814 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
815 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
816 * Parameters: See SER_tr_ReadNChars. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
817 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
818 * Return: 0 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
819 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
820 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
821 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
822 static SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
823 dummy_tr_ReadNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
824 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
825 SYS_UWORD32 chars_to_read) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
826 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
827 return (0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
828 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
829 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
830 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
831 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
832 * dummy_tr_ReadNBytes |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
833 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
834 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
835 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
836 * Parameters: See SER_tr_ReadNBytes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
837 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
838 * Return: 0 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
839 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
840 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
841 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
842 static SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
843 dummy_tr_ReadNBytes (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
844 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
845 SYS_UWORD32 chars_to_read, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
846 SYS_BOOL *eof_detected) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
847 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
848 return (0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
849 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
850 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
851 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
852 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
853 * dummy_tr_WriteNChars |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
854 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
855 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
856 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
857 * Parameters: See SER_tr_WriteNChars. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
858 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
859 * Return: The number of character to write. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
860 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
861 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
862 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
863 static SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
864 dummy_tr_WriteNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
865 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
866 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
867 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
868 return (chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
869 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
870 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
871 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
872 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
873 * dummy_tr_EncapsulateNChars |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
874 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
875 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
876 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
877 * Parameters: See SER_tr_EncapsulateNChars. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
878 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
879 * Return: The number of character to write. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
880 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
881 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
882 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
883 static SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
884 dummy_tr_EncapsulateNChars (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
885 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
886 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
887 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
888 return (chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
889 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
890 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
891 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
892 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
893 * dummy_tr_WriteNBytes |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
894 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
895 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
896 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
897 * Parameters: See SER_tr_WriteNBytes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
898 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
899 * Return: The number of byte to write. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
900 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
901 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
902 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
903 static SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
904 dummy_tr_WriteNBytes (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
905 SYS_UWORD8 *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
906 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
907 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
908 return (chars_to_write); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
909 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
910 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
911 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
912 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
913 * dummy_tr_WriteChar |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
914 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
915 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
916 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
917 * Parameters: See SER_tr_WriteChar. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
918 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
919 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
920 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
921 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
922 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
923 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
924 dummy_tr_WriteChar (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
925 char character) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
926 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
927 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
928 * No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
929 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
930 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
931 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
932 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
933 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
934 * dummy_tr_WriteString |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
935 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
936 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
937 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
938 * Parameters: See SER_tr_WriteString. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
939 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
940 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
941 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
942 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
943 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
944 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
945 dummy_tr_WriteString (T_tr_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
946 char *buffer) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
947 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
948 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
949 * No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
950 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
951 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
952 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
953 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
954 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
955 * dummy_tr_EnterSleep |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
956 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
957 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
958 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
959 * Parameters: See SER_tr_EnterSleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
960 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
961 * Return: 1 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
962 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
963 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
964 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
965 static SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
966 dummy_tr_EnterSleep (T_tr_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
967 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
968 return (1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
969 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
970 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
971 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
972 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
973 * dummy_tr_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
974 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
975 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
976 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
977 * Parameters: See SER_tr_WakeUp. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
978 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
979 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
980 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
981 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
982 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
983 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
984 dummy_tr_WakeUp (T_tr_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
985 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
986 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
987 * No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
988 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
989 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
990 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
991 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
992 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
993 * dummy_fd_Init |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
994 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
995 * Purpose: Sets the size of the circular buffer to the maximum value and the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
996 * state of the driver to 'disabled'. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
997 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
998 * Parameters: See SER_fd_Init. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
999 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1000 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1001 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1002 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1003 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1004 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1005 dummy_fd_Init (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1006 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1007 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1008 data_flow_parameters.bufSize = FD_MAX_BUFFER_SIZE; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1009 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1010 bufSize = FD_MAX_BUFFER_SIZE; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1011 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1012 fd_driver_enabled = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1013 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1014 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1015 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1016 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1017 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1018 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1019 * dummy_fd_Enable |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1020 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1021 * Purpose: Stores the state of the driver. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1022 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1023 * Parameters: See SER_fd_Enable. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1024 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1025 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1026 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1027 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1028 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1029 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1030 dummy_fd_Enable (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1031 SYS_BOOL enable) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1032 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1033 fd_driver_enabled = enable; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1034 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1035 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1036 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1037 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1038 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1039 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1040 * dummy_fd_SetComPar |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1041 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1042 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1043 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1044 * Parameters: See SER_fd_SetComPar. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1045 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1046 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1047 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1048 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1049 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1050 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1051 dummy_fd_SetComPar (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1052 T_baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1053 T_bitsPerCharacter bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1054 T_stopBits sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1055 T_parity parity) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1056 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1057 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1058 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1059 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1060 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1061 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1062 * dummy_fd_SetBuffer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1063 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1064 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1065 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1066 * Parameters: See SER_fd_SetBuffer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1067 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1068 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1069 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1070 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1071 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1072 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1073 dummy_fd_SetBuffer (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1074 SYS_UWORD16 bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1075 SYS_UWORD16 rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1076 SYS_UWORD16 txThreshold) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1077 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1078 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1079 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1080 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1081 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1082 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1083 * dummy_fd_SetFlowCtrl |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1084 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1085 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1086 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1087 * Parameters: See SER_fd_SetFlowCtrl. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1088 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1089 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1090 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1091 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1092 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1093 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1094 dummy_fd_SetFlowCtrl (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1095 T_flowCtrlMode fcMode, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1096 SYS_UWORD8 XON, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1097 SYS_UWORD8 XOFF) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1098 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1099 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1100 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1101 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1102 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1103 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1104 * dummy_fd_SetEscape |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1105 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1106 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1107 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1108 * Parameters: See SER_fd_SetEscape. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1109 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1110 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1111 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1112 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1113 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1114 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1115 dummy_fd_SetEscape (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1116 SYS_UWORD8 escChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1117 SYS_UWORD16 guardPeriod) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1118 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1119 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1120 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1121 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1122 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1123 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1124 * dummy_fd_InpAvail |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1125 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1126 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1127 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1128 * Parameters: See SER_fd_InpAvail. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1129 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1130 * Return: The size of the circular buffer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1131 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1132 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1133 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1134 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1135 dummy_fd_InpAvail (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1136 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1137 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1138 return (data_flow_parameters.bufSize); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1139 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1140 return (bufSize); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1141 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1142 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1143 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1144 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1145 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1146 * dummy_fd_OutpAvail |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1147 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1148 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1149 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1150 * Parameters: See SER_fd_OutpAvail. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1151 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1152 * Return: The size of the circular buffer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1153 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1154 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1155 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1156 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1157 dummy_fd_OutpAvail (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1158 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1159 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1160 return (data_flow_parameters.bufSize); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1161 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1162 return (bufSize); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1163 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1164 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1165 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1166 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1167 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1168 * dummy_fd_EnterSleep |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1169 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1170 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1171 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1172 * Parameters: See SER_tr_EnterSleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1173 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1174 * Return: 1 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1175 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1176 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1177 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1178 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1179 dummy_fd_EnterSleep (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1180 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1181 return (1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1182 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1183 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1184 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1185 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1186 * dummy_fd_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1187 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1188 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1189 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1190 * Parameters: See SER_tr_WakeUp. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1191 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1192 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1193 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1194 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1195 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1196 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1197 dummy_fd_WakeUp (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1198 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1199 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1200 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1201 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1202 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1203 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1204 * dummy_fd_ReadData |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1205 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1206 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1207 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1208 * Parameters: See SER_fd_ReadData. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1209 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1210 * Return: 0 if the suspend parameter is set to 'sm_noSuspend'. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1211 * FD_SUSPENDED if the suspend parameter is set to 'sm_suspend'. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1212 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1213 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1214 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1215 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1216 dummy_fd_ReadData (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1217 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1218 void (readOutFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1219 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1220 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1221 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1222 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1223 SYS_UWORD32 state))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1224 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1225 T_FDRET result; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1226 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1227 if (suspend == sm_noSuspend) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1228 result = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1229 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1230 result = FD_SUSPENDED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1231 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1232 return (result); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1233 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1234 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1235 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1236 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1237 * dummy_fd_WriteData |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1238 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1239 * Purpose: The user's function is called with: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1240 * - cldFromIrq = 0 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1241 * - ndest = 1 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1242 * - dest[0] is a SYS_UWORD8 pointer on the beginning address of a local |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1243 * buffer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1244 * - size[0] is set to data_flow_parameters.bufSize. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1245 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1246 * Parameters: See SER_fd_WriteData. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1247 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1248 * Return: The number of bytes written in the local buffer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1249 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1250 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1251 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1252 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1253 dummy_fd_WriteData (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1254 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1255 void (writeInFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1256 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1257 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1258 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1259 SYS_UWORD16 size[]))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1260 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1261 T_reInstMode dummyInstall; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1262 SYS_UWORD8 *destination[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1263 SYS_UWORD16 buffer_size[2]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1264 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1265 destination[0] = &(fd_buffer[0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1266 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1267 buffer_size[0] = data_flow_parameters.bufSize; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1268 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1269 buffer_size[0] = bufSize; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1270 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1271 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1272 (*writeInFunc) (0, &dummyInstall, 1, &(destination[0]), &(buffer_size[0])); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1273 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1274 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1275 return ((T_FDRET) (data_flow_parameters.bufSize - buffer_size[0])); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1276 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1277 return ((T_FDRET) (bufSize - buffer_size[0])); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1278 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1279 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1280 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1281 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1282 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1283 * dummy_fd_StopRec |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1284 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1285 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1286 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1287 * Parameters: See SER_fd_StopRec. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1288 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1289 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1290 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1291 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1292 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1293 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1294 dummy_fd_StopRec (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1295 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1296 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1297 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1298 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1299 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1300 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1301 * dummy_fd_StartRec |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1302 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1303 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1304 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1305 * Parameters: See SER_fd_StartRec. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1306 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1307 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1308 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1309 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1310 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1311 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1312 dummy_fd_StartRec (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1313 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1314 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1315 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1316 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1317 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1318 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1319 * dummy_fd_GetLineState |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1320 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1321 * Purpose: Sets the RXBLEV field to the bufSize value. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1322 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1323 * Parameters: See SER_fd_GetLineState. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1324 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1325 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1326 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1327 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1328 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1329 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1330 dummy_fd_GetLineState (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1331 SYS_UWORD32 *state) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1332 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1333 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1334 *state = data_flow_parameters.bufSize << RXBLEV; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1335 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1336 *state = bufSize << RXBLEV; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1337 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1338 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1339 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1340 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1341 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1342 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1343 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1344 * dummy_fd_SetLineState |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1345 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1346 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1347 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1348 * Parameters: See SER_fd_SetLineState. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1349 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1350 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1351 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1352 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1353 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1354 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1355 dummy_fd_SetLineState (T_fd_UartId device, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1356 SYS_UWORD32 state, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1357 SYS_UWORD32 mask) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1358 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1359 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1360 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1361 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1362 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1363 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1364 * dummy_fd_CheckXEmpty |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1365 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1366 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1367 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1368 * Parameters: See SER_fd_CheckXEmpty. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1369 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1370 * Return: FD_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1371 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1372 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1373 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1374 static T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1375 dummy_fd_CheckXEmpty (T_fd_UartId device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1376 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1377 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1378 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1379 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1380 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1381 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1382 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1383 * dummy_bt_Init |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1384 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1385 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1386 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1387 * Parameters: See SER_bt_Init. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1388 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1389 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1390 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1391 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1392 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1393 static T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1394 dummy_bt_Init (T_bt_UartId uart_device) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1395 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1396 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1397 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1398 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1399 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1400 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1401 * dummy_bt_Start |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1402 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1403 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1404 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1405 * Parameters: See SER_bt_Start. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1406 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1407 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1408 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1409 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1410 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1411 static T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1412 dummy_bt_Start (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1413 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1414 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1415 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1416 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1417 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1418 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1419 * dummy_bt_Stop |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1420 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1421 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1422 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1423 * Parameters: See SER_bt_Stop. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1424 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1425 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1426 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1427 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1428 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1429 static T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1430 dummy_bt_Stop (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1431 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1432 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1433 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1434 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1435 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1436 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1437 * dummy_bt_Kill |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1438 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1439 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1440 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1441 * Parameters: See SER_bt_Kill. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1442 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1443 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1444 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1445 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1446 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1447 static T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1448 dummy_bt_Kill (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1449 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1450 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1451 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1452 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1453 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1454 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1455 * dummy_bt_SetBaudrate |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1456 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1457 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1458 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1459 * Parameters: See SER_bt_SetBaudrate. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1460 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1461 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1462 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1463 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1464 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1465 static T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1466 dummy_bt_SetBaudrate (UINT8 baudrate) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1467 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1468 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1469 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1470 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1471 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1472 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1473 * dummy_bt_TransmitPacket |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1474 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1475 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1476 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1477 * Parameters: See SER_bt_TransmitPacket. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1478 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1479 * Return: HCI_OK: Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1480 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1481 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1482 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1483 static T_HCI_RET dummy_bt_TransmitPacket (void *uart_tx_buffer) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1484 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1485 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1486 return (HCI_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1487 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1488 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1489 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1490 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1491 * dummy_bt_EnterSleep |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1492 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1493 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1494 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1495 * Parameters: See SER_bt_EnterSleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1496 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1497 * Return: TRUE. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1498 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1499 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1500 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1501 static SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1502 dummy_bt_EnterSleep (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1503 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1504 return (TRUE); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1505 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1506 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1507 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1508 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1509 * dummy_bt_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1510 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1511 * Purpose: No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1512 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1513 * Parameters: See SER_bt_WakeUp |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1514 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1515 * Return: HCI_OK: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1516 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1517 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1518 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1519 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1520 dummy_bt_WakeUp (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1521 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1522 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1523 * No action. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1524 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1525 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1526 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1527 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1528 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1529 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1530 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1531 * analyze_uart_sleep_timer_expiration |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1532 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1533 * Purpose : The timer has just expired. If requested, UARTs can again be set |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1534 * up to enter Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1535 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1536 * Arguments: In : id: parameter not used. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1537 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1538 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1539 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1540 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1541 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1542 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1543 static VOID |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1544 analyze_uart_sleep_timer_expiration (UNSIGNED id) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1545 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1546 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1547 * Timer has expired. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1548 * UARTs can again be set up for Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1549 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1550 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1551 (void) NU_Control_Timer (&uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1552 NU_DISABLE_TIMER); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1553 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1554 uart_sleep_timer_enabled = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1555 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1556 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1557 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1558 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1559 * start_uart_sleep_timer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1560 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1561 * Purpose : Starts the sleep timer once UARTs have been waked-up by an |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1562 * interrupt or if new incoming characters have been received. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1563 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1564 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1565 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1566 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1567 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1568 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1569 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1570 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1571 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1572 start_uart_sleep_timer (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1573 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1574 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1575 * UART sleep timer is started. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1576 * UARTs can't no more be set up for Deep Sleep until the timer expires. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1577 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1578 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1579 (void) NU_Reset_Timer (&uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1580 &analyze_uart_sleep_timer_expiration, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1581 WAKE_UP_TIME_IN_TDMA, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1582 0, /* The timer expires once. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1583 NU_DISABLE_TIMER); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1584 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1585 (void) NU_Control_Timer (&uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1586 NU_ENABLE_TIMER); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1587 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1588 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1589 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1590 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1591 * set_flow_functions |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1592 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1593 * Purpose: Initializes a serial data flow functions set with the set of |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1594 * functions of the selected device. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1595 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1596 * Parameters: In : flow : index of the serial data flow |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1597 * serial_driver: allows knowing which set of functions must |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1598 * be selected |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1599 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1600 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1601 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1602 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1603 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1604 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1605 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1606 set_flow_functions (int flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1607 T_SerialDriver serial_driver) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1608 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1609 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1610 switch (serial_driver) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1611 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1612 case UART_MODEM_FAX_DATA: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1613 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1614 #if CONFIG_FDMODEM |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1615 fd_functions = &uart_modem_fax_data; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1616 int_uart[fd_functions->device].device_used = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1617 int_uart[fd_functions->device].flow_type = FAX_DATA_FLOW; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1618 int_uart[fd_functions->device].flow_id = flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1619 int_uart[fd_functions->device].interrupt_handler = |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1620 UAF_InterruptHandler; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1621 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1622 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1623 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1624 case DUMMY_FAX_DATA: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1625 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1626 fd_functions = &dummy_fax_data; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1627 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1628 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1629 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1630 case UART_IRDA_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1631 case UART_MODEM_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1632 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1633 case UART_MODEM2_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1634 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1635 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1636 if (serial_driver == UART_IRDA_TRACE) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1637 tr_functions[flow] = &uart_irda_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1638 else { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1639 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1640 if (serial_driver == UART_MODEM2_TRACE) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1641 tr_functions[flow] = &uart_modem2_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1642 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1643 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1644 tr_functions[flow] = &uart_modem_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1645 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1646 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1647 int_uart[tr_functions[flow]->device].device_used = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1648 int_uart[tr_functions[flow]->device].flow_type = TRACE_FLOW; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1649 int_uart[tr_functions[flow]->device].flow_id = flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1650 int_uart[tr_functions[flow]->device].interrupt_handler = |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1651 UA_InterruptHandler; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1652 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1653 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1654 case DUMMY_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1655 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1656 tr_functions[flow] = &dummy_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1657 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1658 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1659 case DUMMY_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1660 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1661 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1662 * if serial_driver = DUMMY_BT_HCI & if BTEMOBILE is not defined |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1663 * no action is performed. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1664 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1665 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1666 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1667 bt_functions = &dummy_bt_hci; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1668 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1669 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1670 case UART_IRDA_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1671 case UART_MODEM_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1672 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1673 case UART_MODEM2_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1674 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1675 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1676 if (serial_driver == UART_IRDA_BT_HCI) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1677 bt_functions = &uart_irda_bt_hci; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1678 else { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1679 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1680 if (serial_driver == UART_MODEM2_BT_HCI) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1681 bt_functions = &uart_modem2_bt_hci; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1682 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1683 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1684 bt_functions = &uart_modem_bt_hci; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1685 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1686 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1687 int_uart[bt_functions->device].device_used = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1688 int_uart[bt_functions->device].flow_type = BLUETOOTH_HCI_FLOW; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1689 int_uart[bt_functions->device].flow_id = flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1690 int_uart[bt_functions->device].interrupt_handler = |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1691 hciu_interrupt_handler; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1692 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1693 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1694 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1695 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1696 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1697 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1698 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1699 * SER_InitSerialConfig |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1700 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1701 * Purpose: The parameter serial_info allows knowing all serial information |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1702 * necessary to set up the serial configuration of an application. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1703 * From this information, the function is able to determine if the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1704 * current serial configuration read out from the flash memory is |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1705 * valid. If it does not correspond to an allowed configuration, the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1706 * default configuration is selected. This function must be called at |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1707 * the application's initialization, but never after. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1708 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1709 * Parameters: In : serial_info: application serial information like the default |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1710 * configuration and all allowed configurations. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1711 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1712 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1713 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1714 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1715 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1716 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1717 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1718 SER_InitSerialConfig (const T_AppliSerialInfo *serial_info) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1719 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1720 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1721 int flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1722 SYS_UWORD16 serial_driver; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1723 SYS_UWORD16 *allowed_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1724 SYS_UWORD8 nb_allowed_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1725 SYS_BOOL valid_config_selected; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1726 SYS_BOOL uart_used; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1727 SYS_BOOL uart_used_for_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1728 SYS_UWORD16 current_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1729 SYS_UWORD16 *pt_current_config = &(current_config); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1730 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1731 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1732 * Basic UARTs initializations. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1733 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1734 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1735 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1736 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1737 int_uart[uart_id].base_address = uart_base_address[uart_id]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1738 int_uart[uart_id].device_used = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1739 int_uart[uart_id].deep_sleep_set_up = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1740 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1741 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1742 #if ((CHIPSET == 2) || (CHIPSET == 3)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1743 uart_spurious_interrupts = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1744 #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1745 uart_modem_spurious_interrupts = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1746 uart_irda_spurious_interrupts = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1747 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1748 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1749 uart_modem2_spurious_interrupts = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1750 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1751 uart_sleep_timer_enabled = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1752 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1753 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1754 * Compute the current serial configuration. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1755 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1756 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1757 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1758 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1759 switch (ser_cfg_info[uart_id]) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1760 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1761 case G23_PANEL: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1762 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1763 ((uart_id + 1) << (12 - (4 * SER_PROTOCOL_STACK))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1764 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1765 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1766 case RIVIERA_TRACE_MUX: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1767 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1768 ((uart_id + 1) << (12 - (4 * SER_LAYER_1))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1769 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1770 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1771 case FD_AT_COMMAND: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1772 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1773 ((uart_id + 1) << (12 - (4 * SER_FAX_DATA))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1774 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1775 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1776 case BLUETOOTH_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1777 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1778 ((uart_id + 1) << (12 - (4 * SER_BLUETOOTH_HCI))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1779 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1780 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1781 case DUMMY: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1782 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1783 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1784 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1785 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1786 current_config = serial_cfg; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1787 valid_config_selected = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1788 nb_allowed_config = serial_info->num_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1789 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1790 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1791 * Checks if the current serial config is one of the allowed. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1792 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1793 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1794 while ((nb_allowed_config > 0) && !valid_config_selected) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1795 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1796 nb_allowed_config--; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1797 allowed_config = (SYS_UWORD16 *) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1798 &(serial_info->allowed_config[nb_allowed_config]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1799 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1800 if (*pt_current_config == *allowed_config) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1801 valid_config_selected = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1802 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1803 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1804 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1805 * If not, the default configuration is selected. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1806 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1807 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1808 if (!valid_config_selected) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1809 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1810 pt_current_config = (SYS_UWORD16 *)&(serial_info->default_config); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1811 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1812 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1813 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1814 * Setup the global variable accordingly. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1815 * The following default value are identical to the ones defined at |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1816 * the application initialization in init.c. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1817 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1818 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1819 #ifdef BT_UART_USED_MODEM |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1820 memcpy (ser_cfg_info, "RB", NUMBER_OF_TR_UART); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1821 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1822 memcpy (ser_cfg_info, "BR", NUMBER_OF_TR_UART); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1823 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1824 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1825 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1826 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1827 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1828 * The serial data flow functions set is initialized. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1829 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1830 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1831 flow = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1832 while (flow < SER_MAX_NUMBER_OF_FLOWS) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1833 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1834 serial_driver = (T_SerialDriver) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1835 (((*pt_current_config) >> (12 - flow * 4)) & 0x000F); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1836 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1837 set_flow_functions (flow, serial_driver); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1838 flow++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1839 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1840 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1841 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1842 * Checks if both UARTs are used. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1843 * If not, performs minimum initialization including Sleep Mode. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1844 * Checks also if at least one UART is used by a Trace flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1845 * If so, create a HISR in order to reset and restart the sleep timer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1846 * in case of incoming characters. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1847 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1848 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1849 uart_used = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1850 uart_used_for_trace = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1851 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1852 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1853 if (!(int_uart[uart_id].device_used)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1854 initialize_uart_sleep (uart_id); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1855 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1856 else { /* if (int_uart[uart_id].device_used) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1857 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1858 uart_used = 1; /* At least one UART is used */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1859 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1860 if (int_uart[uart_id].flow_type == TRACE_FLOW) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1861 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1862 /* At least one UART used by a Trace flow */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1863 uart_used_for_trace = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1864 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1865 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1866 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1867 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1868 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1869 * If at least one uart is used, create a timer to figure out if the system |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1870 * can enter deep sleep mode regarding the UARTs. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1871 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1872 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1873 if (uart_used) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1874 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1875 (void) NU_Create_Timer ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1876 &uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1877 "Sleep", |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1878 &analyze_uart_sleep_timer_expiration, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1879 0, /* Parameter supplied to the routine: not used. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1880 WAKE_UP_TIME_IN_TDMA, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1881 0, /* The timer expires once. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1882 NU_DISABLE_TIMER); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1883 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1884 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1885 * If at least one uart is used by a Trace flow, create a HISR to reset |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1886 * and restart the sleep timer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1887 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1888 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1889 if (uart_used_for_trace) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1890 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1891 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1892 * The stack is entirely filled with the pattern 0xFE. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1893 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1894 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1895 memset (&(timer_hisr_stack[0]), 0xFE, TIMER_HISR_STACK_SIZE); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1896 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1897 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1898 * The HISR entry function is the same function than the one called |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1899 * by the Rx HISR of the UARTFAX, since the only aim is to reset |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1900 * and restart the sleep timer in case of incoming characters on |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1901 * the Trace UART. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1902 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1903 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1904 (void) NU_Create_HISR ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1905 &timer_hisr_ctrl_block, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1906 "Tim_HISR", |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1907 SER_restart_uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1908 TIMER_HISR_PRIORITY, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1909 &(timer_hisr_stack[0]), |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1910 TIMER_HISR_STACK_SIZE); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1911 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1912 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1913 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1914 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1915 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1916 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1917 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1918 * SER_WriteConfig |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1919 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1920 * Purpose: TBD |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1921 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1922 * Parameters: In : new_config: TBD |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1923 * write_to_flash: TBD |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1924 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1925 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1926 * Return: 0 (FALSE) : In case of error while trying to write file in FFS |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1927 * >= 1 (TRUE) : Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1928 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1929 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1930 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1931 SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1932 SER_WriteConfig (char *new_config, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1933 SYS_BOOL write_to_flash) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1934 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1935 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1936 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1937 SYS_BOOL status = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1938 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1939 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1940 ser_new_cfg[uart_id] = *new_config++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1941 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1942 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1943 * Write in flash the new serial configuration if requested. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1944 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1945 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1946 if (write_to_flash) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1947 if (ffs_fwrite (uart_config_file, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1948 ser_new_cfg, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1949 NUMBER_OF_TR_UART) < EFFS_OK) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1950 status = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1951 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1952 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1953 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1954 return (status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1955 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1956 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1957 * Real Dynamic Switch is only available with Bluetooth AND all chips but |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1958 * Calypso+. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1959 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1960 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1961 return (1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1962 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1963 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1964 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1965 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1966 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1967 * SER_ImmediateSwitch |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1968 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1969 * Purpose: TBD |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1970 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1971 * Parameters: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1972 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1973 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1974 * Return: 0 (FALSE) : In case of error. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1975 * >= 1 (TRUE) : Successful operation. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1976 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1977 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1978 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1979 SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1980 SER_ImmediateSwitch (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1981 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1982 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1983 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1984 SYS_BOOL valid_config = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1985 T_AppliSerialInfo *serial_info = &appli_ser_cfg_info; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1986 SYS_UWORD8 nb_allowed_config = serial_info->num_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1987 SYS_UWORD16 *allowed_config; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1988 int flow; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1989 T_SerialDriver serial_flows[SER_MAX_NUMBER_OF_FLOWS]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1990 T_tr_UartId uart_nb; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1991 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1992 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1993 * First check if the new serial configuration is actually different from |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1994 * the previous one. A return is used to simplify the code. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1995 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1996 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1997 if (!memcmp (ser_new_cfg, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1998 ser_cfg_info, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
1999 NUMBER_OF_TR_UART)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2000 return (1); /* new config and old config are identical => nothing to do */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2001 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2002 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2003 * Then check if the new serial config is valid or not. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2004 * At that point, we assume that a serial config is valid if and only if the |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2005 * Bluetooth HCI flow is still enabled and still uses the same UART. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2006 * Reset the current serial config, and compute the new one. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2007 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2008 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2009 serial_cfg = 0x0048; /* All dummies */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2010 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2011 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2012 switch (ser_new_cfg[uart_id]) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2013 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2014 case G23_PANEL: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2015 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2016 ((uart_id + 1) << (12 - (4 * SER_PROTOCOL_STACK))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2017 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2018 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2019 case RIVIERA_TRACE_MUX: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2020 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2021 ((uart_id + 1) << (12 - (4 * SER_LAYER_1))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2022 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2023 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2024 case FD_AT_COMMAND: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2025 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2026 ((uart_id + 1) << (12 - (4 * SER_FAX_DATA))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2027 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2028 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2029 case BLUETOOTH_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2030 serial_cfg = serial_cfg + |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2031 ((uart_id + 1) << (12 - (4 * SER_BLUETOOTH_HCI))); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2032 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2033 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2034 * Check if the Bluetooth HCI flow is enabled on the same UART. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2035 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2036 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2037 if (ser_cfg_info[uart_id] == BLUETOOTH_HCI) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2038 valid_config = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2039 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2040 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2041 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2042 case DUMMY: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2043 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2044 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2045 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2046 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2047 if (!valid_config) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2048 return (0); /* Bluetooth HCI flow not enabled in the new serial config, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2049 or enabled but using a different UART. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2050 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2051 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2052 * Finally check if the new serial config is allowed by the application. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2053 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2054 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2055 valid_config = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2056 while ((nb_allowed_config > 0) && !valid_config) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2057 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2058 nb_allowed_config--; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2059 allowed_config = (SYS_UWORD16 *) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2060 &(serial_info->allowed_config[nb_allowed_config]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2061 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2062 if (serial_cfg == *allowed_config) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2063 valid_config = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2064 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2065 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2066 if (!valid_config) /* the new config is not allowed by the application */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2067 return (0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2068 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2069 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2070 * From now on, Dynamic Switch is being processed. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2071 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2072 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2073 dynamic_switch = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2074 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2075 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2076 * Disable UART interrupts until new serial config setup is complete. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2077 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2078 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2079 #if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2080 IQ_Mask (IQ_UART_IRDA_IT); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2081 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2082 IQ_Mask (IQ_UART_IT); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2083 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2084 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2085 * Reset UARTs set-up. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2086 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2087 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2088 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2089 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2090 int_uart[uart_id].device_used = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2091 int_uart[uart_id].deep_sleep_set_up = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2092 int_uart[uart_id].interrupt_handler = NULL; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2093 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2094 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2095 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2096 * All function pointers are set to dummy functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2097 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2098 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2099 rvf_disable (21); /* beginning of the critical section */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2100 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2101 for (flow = 0; flow < SER_MAX_NUMBER_OF_FLOWS; flow++) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2102 tr_functions[flow] = &dummy_trace; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2103 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2104 fd_functions = &dummy_fax_data; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2105 bt_functions = &dummy_bt_hci; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2106 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2107 rvf_enable (); /* end of the critical section */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2108 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2109 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2110 * Calls the Exit function of the UARTFAX driver if it was previously used. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2111 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2112 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2113 if (uart_fd_initialized) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2114 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2115 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2116 * UART IrDA can't be used for F&D/AT-Cmd flow => UART Modem was used |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2117 * by the F&D/AT-Cmd flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2118 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2119 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2120 if (UAF_Exit (UAF_UART_1) == FD_OK) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2121 uart_fd_initialized = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2122 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2123 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2124 else { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2125 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2126 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2127 * AT that point, since the Bluetooth HCI flow already uses one UART, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2128 * and since the second UART was not used by the F&D/AT-Cmd flow, we |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2129 * assume it was used by a Trace flow. Therefore, the HISR used to |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2130 * reset and restart the sleep timer is deleted. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2131 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2132 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2133 (void) NU_Delete_HISR (&timer_hisr_ctrl_block); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2134 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2135 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2136 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2137 * Initialization of the new flows (Only AT-Cmd/F&D or Riviera/Layer1 Trace) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2138 * and their associated UARTs HW (Irda or Modem) & SW (Trace or Fax&Data). |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2139 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2140 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2141 for (flow = 0; flow < SER_MAX_NUMBER_OF_FLOWS; flow++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2142 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2143 serial_flows[flow] = (T_SerialDriver) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2144 ((serial_cfg >> (12 - flow * 4)) & 0x000F); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2145 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2146 switch (serial_flows[flow]) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2147 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2148 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2149 * For Riviera/Layer1 Trace flow, default baudrate is 115200 bps |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2150 * and callback function is defined in rvt_def_i.h. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2151 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2152 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2153 case UART_IRDA_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2154 case UART_MODEM_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2155 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2156 if (serial_flows[flow] == UART_IRDA_TRACE) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2157 uart_nb = UA_UART_0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2158 else /* if (serial_flows[flow] == UART_MODEM_TRACE) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2159 uart_nb = UA_UART_1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2160 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2161 if (flow == SER_LAYER_1) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2162 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2163 UA_Init (uart_nb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2164 TR_BAUD_CONFIG, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2165 rvt_activate_RX_HISR); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2166 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2167 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2168 * Create the HISR used to reset and restart the sleep |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2169 * timer in case of incoming characters on the Trace flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2170 * The stack is entirely filled with the pattern 0xFE. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2171 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2172 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2173 memset (&(timer_hisr_stack[0]), |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2174 0xFE, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2175 TIMER_HISR_STACK_SIZE); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2176 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2177 (void) NU_Create_HISR ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2178 &timer_hisr_ctrl_block, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2179 "Tim_HISR", |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2180 SER_restart_uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2181 TIMER_HISR_PRIORITY, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2182 &(timer_hisr_stack[0]), |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2183 TIMER_HISR_STACK_SIZE); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2184 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2185 else /* Other Trace flows are disabled */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2186 initialize_uart_sleep (uart_nb); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2187 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2188 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2189 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2190 * For At-Cmd/F&D flow, functions are called in the appropriate |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2191 * order with the saved parameters. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2192 * This has been figured out from the G23 initialization. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2193 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2194 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2195 case UART_MODEM_FAX_DATA: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2196 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2197 /* Global Initialization */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2198 if (UAF_Init (UAF_UART_1) == FD_OK) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2199 uart_fd_initialized = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2200 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2201 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2202 /* Disable the driver */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2203 UAF_Enable (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2204 0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2205 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2206 /* Set the SW Buffers parameters */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2207 UAF_SetBuffer (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2208 data_flow_parameters.bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2209 data_flow_parameters.rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2210 data_flow_parameters.txThreshold); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2211 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2212 /* Set the Escape Sequence parameters (1st call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2213 UAF_SetEscape (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2214 data_flow_parameters.escChar[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2215 data_flow_parameters.guardPeriod[0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2216 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2217 /* Set the Communication parameters (1st call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2218 UAF_SetComPar (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2219 data_flow_parameters.baudrate[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2220 data_flow_parameters.bpc[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2221 data_flow_parameters.sb[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2222 data_flow_parameters.parity[0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2223 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2224 /* Set the Flow Control parameters (1st call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2225 UAF_SetFlowCtrl (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2226 data_flow_parameters.fcMode[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2227 data_flow_parameters.XON[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2228 data_flow_parameters.XOFF[0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2229 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2230 /* Set the Communication parameters (2nd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2231 UAF_SetComPar (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2232 data_flow_parameters.baudrate[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2233 data_flow_parameters.bpc[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2234 data_flow_parameters.sb[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2235 data_flow_parameters.parity[1]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2236 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2237 /* Set the Flow Control parameters (2nd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2238 UAF_SetFlowCtrl (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2239 data_flow_parameters.fcMode[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2240 data_flow_parameters.XON[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2241 data_flow_parameters.XOFF[1]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2242 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2243 /* Set the Escape Sequence parameters (2nd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2244 UAF_SetEscape (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2245 data_flow_parameters.escChar[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2246 data_flow_parameters.guardPeriod[1]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2247 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2248 /* Enable the driver */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2249 UAF_Enable (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2250 1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2251 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2252 /* Get the number of input bytes available */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2253 UAF_InpAvail (UAF_UART_1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2254 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2255 /* Set the readOutFunc and the suspend mode */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2256 UAF_ReadData (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2257 data_flow_parameters.suspend_rd, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2258 data_flow_parameters.readOutFunc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2259 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2260 /* Get the number of output bytes available (1st call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2261 UAF_OutpAvail (UAF_UART_1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2262 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2263 /* Set the states of the V.24 status lines (1st call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2264 UAF_SetLineState (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2265 data_flow_parameters.state[0], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2266 data_flow_parameters.mask[0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2267 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2268 /* Set the states of the V.24 status lines (2nd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2269 UAF_SetLineState (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2270 data_flow_parameters.state[1], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2271 data_flow_parameters.mask[1]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2272 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2273 /* Set the states of the V.24 status lines (3rd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2274 UAF_SetLineState (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2275 data_flow_parameters.state[2], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2276 data_flow_parameters.mask[2]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2277 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2278 /* Set the states of the V.24 status lines (4th call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2279 UAF_SetLineState (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2280 data_flow_parameters.state[3], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2281 data_flow_parameters.mask[3]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2282 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2283 /* Set the writeInFunc and the suspend mode */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2284 UAF_WriteData (UAF_UART_1, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2285 data_flow_parameters.suspend_wr, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2286 data_flow_parameters.writeInFunc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2287 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2288 /* Get the number of output bytes available (2nd call) */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2289 UAF_OutpAvail (UAF_UART_1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2290 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2291 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2292 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2293 case UART_IRDA_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2294 case UART_MODEM_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2295 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2296 * Nothing to initialize for Bluetooth HCI flow since it does |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2297 * use the same UART. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2298 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2299 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2300 case DUMMY_TRACE: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2301 case DUMMY_FAX_DATA: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2302 case DUMMY_BT_HCI: |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2303 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2304 * Of course nothing to perform for Dummy flows. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2305 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2306 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2307 break; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2308 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2309 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2310 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2311 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2312 * All function pointers are set to the appropriate functions set. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2313 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2314 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2315 for (flow = 0; flow < SER_MAX_NUMBER_OF_FLOWS; flow++){ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2316 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2317 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2318 * For Dummy flows, pointers to dummy functions are already set. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2319 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2320 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2321 if ((serial_flows[flow] != DUMMY_TRACE) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2322 (serial_flows[flow] != DUMMY_FAX_DATA) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2323 (serial_flows[flow] != DUMMY_BT_HCI)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2324 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2325 rvf_disable (21); /* beginning of the critical section */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2326 set_flow_functions (flow, serial_flows[flow]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2327 rvf_enable (); /* end of the critical section */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2328 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2329 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2330 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2331 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2332 * Dynamic Switch has been processed. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2333 * The new serial config is actually stored. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2334 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2335 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2336 dynamic_switch = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2337 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2338 ser_cfg_info[uart_id] = ser_new_cfg[uart_id]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2339 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2340 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2341 * Re-enable UART interrupts. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2342 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2343 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2344 #if ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2345 IQ_Unmask (IQ_UART_IRDA_IT); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2346 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2347 IQ_Unmask (IQ_UART_IT); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2348 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2349 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2350 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2351 * Real Dynamic Switch is only available with Bluetooth AND all chips but |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2352 * Calypso+. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2353 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2354 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2355 return (1); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2356 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2357 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2358 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2359 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2360 * All functions SER_tr_xxx and SER_fd_xxx call a function of the UART trace |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2361 * driver or the UART fax & data driver. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2362 * All functions SER_bt_xxx call a function of the UART Bluetooth HCI driver. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2363 * See the function call for parameters and return values. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2364 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2365 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2366 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2367 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2368 SER_tr_Init (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2369 T_tr_Baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2370 void (callback_function (void))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2371 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2372 tr_functions[serial_data_flow]->tr_Init ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2373 tr_functions[serial_data_flow]->device, baudrate, callback_function); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2374 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2375 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2376 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2377 SER_tr_ReadNChars (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2378 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2379 SYS_UWORD32 chars_to_read) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2380 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2381 return (tr_functions[serial_data_flow]->tr_ReadNChars ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2382 tr_functions[serial_data_flow]->device, buffer, chars_to_read)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2383 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2384 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2385 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2386 SER_tr_ReadNBytes (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2387 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2388 SYS_UWORD32 chars_to_read, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2389 SYS_BOOL *eof_detected) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2390 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2391 return (tr_functions[serial_data_flow]->tr_ReadNBytes ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2392 tr_functions[serial_data_flow]->device, buffer, chars_to_read, eof_detected)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2393 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2394 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2395 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2396 SER_tr_WriteNChars (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2397 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2398 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2399 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2400 return (tr_functions[serial_data_flow]->tr_WriteNChars ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2401 tr_functions[serial_data_flow]->device, buffer, chars_to_write)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2402 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2403 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2404 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2405 SER_tr_EncapsulateNChars (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2406 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2407 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2408 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2409 return (tr_functions[serial_data_flow]->tr_EncapsulateNChars ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2410 tr_functions[serial_data_flow]->device, buffer, chars_to_write)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2411 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2412 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2413 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2414 SER_tr_WriteNBytes (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2415 SYS_UWORD8 *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2416 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2417 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2418 return (tr_functions[serial_data_flow]->tr_WriteNBytes ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2419 tr_functions[serial_data_flow]->device, buffer, chars_to_write)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2420 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2421 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2422 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2423 SER_tr_WriteChar (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2424 char character) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2425 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2426 tr_functions[serial_data_flow]->tr_WriteChar ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2427 tr_functions[serial_data_flow]->device, character); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2428 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2429 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2430 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2431 SER_tr_WriteString (int serial_data_flow, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2432 char *buffer) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2433 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2434 tr_functions[serial_data_flow]->tr_WriteString ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2435 tr_functions[serial_data_flow]->device, buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2436 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2437 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2438 SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2439 SER_tr_EnterSleep (int serial_data_flow) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2440 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2441 return (tr_functions[serial_data_flow]->tr_EnterSleep ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2442 tr_functions[serial_data_flow]->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2443 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2444 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2445 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2446 SER_tr_WakeUp (int serial_data_flow) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2447 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2448 tr_functions[serial_data_flow]->tr_WakeUp ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2449 tr_functions[serial_data_flow]->device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2450 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2451 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2452 /* Dummy function for backward compatibility. */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2453 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2454 SER_fd_Init (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2455 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2456 return (FD_OK); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2457 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2458 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2459 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2460 SER_fd_Initialize (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2461 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2462 T_FDRET status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2463 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2464 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2465 data_flow_parameters.bufSize = FD_MAX_BUFFER_SIZE; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2466 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2467 bufSize = FD_MAX_BUFFER_SIZE; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2468 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2469 status = fd_functions->fd_Initialize (fd_functions->device); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2470 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2471 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2472 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2473 * Check if the UARTFAX driver has actually been initialized. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2474 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2475 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2476 if ((fd_functions->fd_Initialize == UAF_Init) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2477 (status = FD_OK)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2478 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2479 uart_fd_initialized = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2480 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2481 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2482 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2483 return (status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2484 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2485 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2486 static void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2487 fd_dbgtrace(char *msg, UINT32 val) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2488 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2489 rvf_send_trace(msg, strlen(msg), val, RV_TRACE_LEVEL_DEBUG_HIGH, 0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2490 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2491 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2492 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2493 SER_fd_Enable (SYS_BOOL enable) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2494 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2495 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2496 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2497 fd_dbgtrace("SER_fd_Enable called", enable); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2498 rc = fd_functions->fd_Enable (fd_functions->device, enable); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2499 fd_dbgtrace("fd_Enable returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2500 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2501 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2502 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2503 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2504 SER_fd_SetComPar (T_baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2505 T_bitsPerCharacter bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2506 T_stopBits sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2507 T_parity parity) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2508 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2509 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2510 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2511 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2512 sprintf(trbuf, "SER_fd_SetComPar(%d, %d, %d, %d)", |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2513 baudrate, bpc, sb, parity); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2514 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2515 rc = (fd_functions->fd_SetComPar ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2516 fd_functions->device, baudrate, bpc, sb, parity)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2517 fd_dbgtrace("fd_SetComPar returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2518 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2519 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2520 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2521 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2522 SER_fd_SetBuffer (SYS_UWORD16 bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2523 SYS_UWORD16 rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2524 SYS_UWORD16 txThreshold) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2525 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2526 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2527 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2528 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2529 sprintf(trbuf, "SER_fd_SetBuffer(%u, %u, %u)", |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2530 bufSize, rxThreshold, txThreshold); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2531 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2532 rc = (fd_functions->fd_SetBuffer ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2533 fd_functions->device, bufSize, rxThreshold, txThreshold)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2534 fd_dbgtrace("fd_SetBuffer returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2535 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2536 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2537 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2538 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2539 SER_fd_SetFlowCtrl (T_flowCtrlMode fcMode, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2540 SYS_UWORD8 XON, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2541 SYS_UWORD8 XOFF) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2542 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2543 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2544 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2545 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2546 sprintf(trbuf, "SER_fd_SetFlowCtrl(%d, %02x, %02x)", fcMode, XON, XOFF); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2547 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2548 rc = (fd_functions->fd_SetFlowCtrl ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2549 fd_functions->device, fcMode, XON, XOFF)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2550 fd_dbgtrace("fd_SetFlowCtrl returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2551 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2552 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2553 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2554 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2555 SER_fd_SetEscape (char escChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2556 SYS_UWORD16 guardPeriod) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2557 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2558 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2559 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2560 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2561 sprintf(trbuf, "SER_fd_SetEscape(%02x, %u)", escChar, guardPeriod); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2562 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2563 rc = (fd_functions->fd_SetEscape ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2564 fd_functions->device, escChar, guardPeriod)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2565 fd_dbgtrace("fd_SetEscape returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2566 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2567 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2568 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2569 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2570 SER_fd_InpAvail (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2571 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2572 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2573 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2574 fd_dbgtrace("SER_fd_InpAvail called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2575 rc = (fd_functions->fd_InpAvail (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2576 fd_dbgtrace("fd_InpAvail returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2577 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2578 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2579 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2580 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2581 SER_fd_OutpAvail (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2582 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2583 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2584 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2585 fd_dbgtrace("SER_fd_OutpAvail called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2586 rc = (fd_functions->fd_OutpAvail (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2587 fd_dbgtrace("fd_OutpAvail returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2588 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2589 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2590 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2591 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2592 SER_fd_EnterSleep (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2593 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2594 return (fd_functions->fd_EnterSleep (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2595 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2596 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2597 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2598 SER_fd_WakeUp (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2599 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2600 return (fd_functions->fd_WakeUp (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2601 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2602 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2603 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2604 SER_fd_ReadData (T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2605 void (readOutFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2606 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2607 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2608 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2609 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2610 SYS_UWORD32 state))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2611 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2612 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2613 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2614 fd_dbgtrace("SER_fd_ReadData called", suspend); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2615 rc = (fd_functions->fd_ReadData ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2616 fd_functions->device, suspend, readOutFunc)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2617 fd_dbgtrace("fd_ReadData returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2618 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2619 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2620 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2621 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2622 SER_fd_WriteData (T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2623 void (writeInFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2624 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2625 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2626 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2627 SYS_UWORD16 size[]))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2628 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2629 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2630 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2631 fd_dbgtrace("SER_fd_WriteData called", suspend); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2632 rc = (fd_functions->fd_WriteData ( |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2633 fd_functions->device, suspend, writeInFunc)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2634 fd_dbgtrace("fd_WriteData returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2635 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2636 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2637 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2638 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2639 SER_fd_StopRec (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2640 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2641 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2642 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2643 fd_dbgtrace("SER_fd_StopRec called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2644 rc = (fd_functions->fd_StopRec (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2645 fd_dbgtrace("fd_StopRec returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2646 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2647 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2648 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2649 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2650 SER_fd_StartRec (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2651 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2652 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2653 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2654 fd_dbgtrace("SER_fd_StartRec called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2655 rc = (fd_functions->fd_StartRec (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2656 fd_dbgtrace("fd_StartRec returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2657 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2658 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2659 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2660 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2661 SER_fd_GetLineState (SYS_UWORD32 *state) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2662 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2663 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2664 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2665 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2666 fd_dbgtrace("SER_fd_GetLineState called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2667 rc = (fd_functions->fd_GetLineState (fd_functions->device, state)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2668 sprintf(trbuf, "fd_GetLineState returned %d, %x", rc, *state); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2669 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2670 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2671 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2672 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2673 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2674 SER_fd_SetLineState (SYS_UWORD32 state, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2675 SYS_UWORD32 mask) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2676 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2677 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2678 char trbuf[80]; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2679 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2680 sprintf(trbuf, "SER_fd_SetLineState(%x, %x)", state, mask); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2681 fd_dbgtrace(trbuf, NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2682 rc = (fd_functions->fd_SetLineState (fd_functions->device, state, mask)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2683 fd_dbgtrace("fd_SetLineState returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2684 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2685 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2686 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2687 T_FDRET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2688 SER_fd_CheckXEmpty (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2689 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2690 T_FDRET rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2691 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2692 fd_dbgtrace("SER_fd_CheckXEmpty called", NULL_PARAM); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2693 rc = (fd_functions->fd_CheckXEmpty (fd_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2694 fd_dbgtrace("fd_CheckXEmpty returned", rc); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2695 return rc; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2696 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2697 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2698 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2699 T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2700 SER_bt_Init (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2701 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2702 return (bt_functions->bt_Init (bt_functions->device)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2703 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2704 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2705 T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2706 SER_bt_Start (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2707 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2708 return (bt_functions->bt_Start ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2709 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2710 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2711 T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2712 SER_bt_Stop (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2713 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2714 return (bt_functions->bt_Stop ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2715 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2716 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2717 T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2718 SER_bt_Kill (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2719 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2720 return (bt_functions->bt_Kill ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2721 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2722 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2723 T_HCI_RET |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2724 SER_bt_SetBaudrate (UINT8 baudrate) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2725 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2726 return (bt_functions->bt_SetBaudrate (baudrate)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2727 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2728 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2729 T_HCI_RET SER_bt_TransmitPacket (void *uart_tx_buffer) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2730 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2731 return (bt_functions->bt_TransmitPacket (uart_tx_buffer)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2732 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2733 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2734 SYS_BOOL SER_bt_EnterSleep (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2735 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2736 return (bt_functions->bt_EnterSleep()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2737 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2738 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2739 void SER_bt_WakeUp (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2740 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2741 bt_functions->bt_WakeUp(); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2742 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2743 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2744 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2745 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2746 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2747 * SER_UartSleepStatus |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2748 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2749 * Purpose: This function checks if both UARTs are ready to enter Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2750 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2751 * Parameters: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2752 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2753 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2754 * Return: 0 : Deep Sleep is not possible. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2755 * >= 1 : Deep Sleep is possible. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2756 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2757 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2758 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2759 SYS_BOOL |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2760 SER_UartSleepStatus (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2761 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2762 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2763 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2764 SYS_BOOL status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2765 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2766 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2767 * Check first if the sleep timer is active or if a Dynamic Switch is |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2768 * being processed. A return is used to simplify the code. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2769 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2770 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2771 #if SERIAL_DYNAMIC_SWITCH |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2772 if (uart_sleep_timer_enabled || dynamic_switch) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2773 #else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2774 if (uart_sleep_timer_enabled) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2775 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2776 return (0); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2777 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2778 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2779 * Check if both UARTs are ready to enter Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2780 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2781 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2782 status = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2783 uart_id = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2784 while ((uart_id < NUMBER_OF_TR_UART) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2785 (status)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2786 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2787 uart = &(int_uart[uart_id]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2788 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2789 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2790 * Check if the specified UART is actually used. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2791 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2792 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2793 if (uart->device_used) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2794 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2795 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2796 * Check if the specified UART is used by a Trace or |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2797 * by a Fax & Data flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2798 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2799 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2800 if (uart->flow_type == TRACE_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2801 status = SER_tr_EnterSleep (uart->flow_id); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2802 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2803 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2804 if (uart->flow_type == FAX_DATA_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2805 status = (SYS_BOOL) SER_fd_EnterSleep (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2806 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2807 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2808 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2809 status = SER_bt_EnterSleep(); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2810 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2811 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2812 status = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2813 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2814 if (status) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2815 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2816 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2817 * The specified UART is now set up for Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2818 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2819 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2820 uart->deep_sleep_set_up = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2821 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2822 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2823 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2824 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2825 uart_id++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2826 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2827 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2828 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2829 * Check if Deep Sleep is finally possible. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2830 * If not revert eventual Deep Sleep settings. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2831 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2832 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2833 if (!status) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2834 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2835 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2836 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2837 uart = &(int_uart[uart_id]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2838 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2839 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2840 * If the specified used UART has already been set up for |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2841 * Deep Sleep, revert these settings. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2842 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2843 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2844 if ((uart->device_used) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2845 (uart->deep_sleep_set_up)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2846 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2847 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2848 * Check if the specified UART is used by a Trace or |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2849 * by a Fax & Data flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2850 * Bluetooth HCI can not yet handled Deep Sleep Mode. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2851 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2852 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2853 if (uart->flow_type == TRACE_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2854 SER_tr_WakeUp (uart->flow_id); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2855 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2856 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2857 if (uart->flow_type == FAX_DATA_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2858 SER_fd_WakeUp (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2859 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2860 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2861 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2862 SER_bt_WakeUp (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2863 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2864 uart->deep_sleep_set_up = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2865 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2866 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2867 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2868 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2869 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2870 return (status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2871 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2872 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2873 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2874 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2875 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2876 * SER_WakeUpUarts |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2877 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2878 * Purpose: This function wakes up used UARTs after Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2879 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2880 * Parameters: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2881 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2882 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2883 * Return: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2884 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2885 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2886 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2887 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2888 SER_WakeUpUarts (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2889 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2890 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2891 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2892 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2893 if (uart_sleep_timer_enabled) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2894 start_uart_sleep_timer (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2895 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2896 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2897 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2898 uart = &(int_uart[uart_id]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2899 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2900 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2901 * Check if the specified UART is actually used, and has not yet |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2902 * been waked up. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2903 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2904 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2905 if ((uart->device_used) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2906 (uart->deep_sleep_set_up)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2907 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2908 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2909 * Check if the specified UART is used by a Trace or |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2910 * by a Fax & Data flow. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2911 * Bluetooth HCI can not yet handled Deep Sleep Mode. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2912 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2913 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2914 if (uart->flow_type == TRACE_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2915 SER_tr_WakeUp (uart->flow_id); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2916 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2917 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2918 if (uart->flow_type == FAX_DATA_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2919 SER_fd_WakeUp (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2920 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2921 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2922 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2923 SER_bt_WakeUp (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2924 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2925 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2926 * The specified UART is no more set up for Deep Sleep. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2927 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2928 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2929 uart->deep_sleep_set_up = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2930 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2931 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2932 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2933 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2934 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2935 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2936 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2937 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2938 * SER_restart_uart_sleep_timer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2939 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2940 * Purpose : Resets and restarts the sleep timer each time some characters are |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2941 * received. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2942 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2943 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2944 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2945 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2946 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2947 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2948 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2949 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2950 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2951 SER_restart_uart_sleep_timer (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2952 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2953 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2954 * First disable the timer. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2955 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2956 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2957 (void) NU_Control_Timer (&uart_sleep_timer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2958 NU_DISABLE_TIMER); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2959 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2960 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2961 * Then start again this timer for a new period. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2962 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2963 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2964 start_uart_sleep_timer (); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2965 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2966 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2967 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2968 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2969 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2970 * SER_activate_timer_hisr |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2971 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2972 * Purpose : Activates the timer HISR to reset and restart the sleep timer |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2973 * each time some characters are received. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2974 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2975 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2976 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2977 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2978 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2979 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2980 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2981 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2982 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2983 SER_activate_timer_hisr (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2984 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2985 (void) NU_Activate_HISR (&timer_hisr_ctrl_block); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2986 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2987 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2988 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2989 #if ((CHIPSET == 2) || (CHIPSET == 3)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2990 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2991 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2992 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2993 * SER_uart_handler |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2994 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2995 * Purpose : UART interrupt handler. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2996 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2997 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2998 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
2999 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3000 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3001 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3002 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3003 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3004 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3005 SER_uart_handler (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3006 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3007 SYS_UWORD8 interrupt_status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3008 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3009 int uart_id; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3010 SYS_BOOL it_identified; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3011 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3012 it_identified = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3013 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3014 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3015 * Check first for a wake-up interrupt. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3016 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3017 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3018 uart_id = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3019 while ((uart_id < NUMBER_OF_TR_UART) && |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3020 (!it_identified)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3021 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3022 uart = &(int_uart[uart_id]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3023 interrupt_status = READ_UART_REGISTER (uart, SSR); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3024 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3025 if (interrupt_status & RX_CTS_WAKE_UP_STS) { /* Wake-up IT has occurred */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3026 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3027 it_identified = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3028 uart_sleep_timer_enabled = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3029 DISABLE_WAKE_UP_INTERRUPT (uart); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3030 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3031 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3032 uart_id++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3033 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3034 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3035 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3036 * If no wake-up interrupt has been detected, check then systematically |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3037 * both UARTs for other interrupt causes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3038 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3039 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3040 if (!it_identified) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3041 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3042 for (uart_id = 0; uart_id < NUMBER_OF_TR_UART; uart_id++) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3043 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3044 uart = &(int_uart[uart_id]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3045 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3046 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3047 if (!(interrupt_status & IT_NOT_PENDING)) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3048 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3049 it_identified = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3050 (*(uart->interrupt_handler)) (uart_id, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3051 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3052 } else { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3053 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3054 if ((uart_id == UA_UART_1) && (!it_identified)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3055 uart_spurious_interrupts++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3056 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3057 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3058 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3059 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3060 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3061 #elif ((CHIPSET == 4) || (CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3062 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3063 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3064 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3065 * SER_uart_modem_handler |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3066 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3067 * Purpose : UART MODEM interrupt handler. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3068 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3069 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3070 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3071 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3072 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3073 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3074 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3075 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3076 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3077 SER_uart_modem_handler (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3078 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3079 SYS_UWORD8 interrupt_status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3080 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3081 SYS_BOOL it_wakeup_identified; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3082 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3083 it_wakeup_identified = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3084 uart = &(int_uart[UA_UART_1]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3085 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3086 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3087 * Check first for a wake-up interrupt. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3088 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3089 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3090 interrupt_status = READ_UART_REGISTER (uart, SSR); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3091 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3092 if (interrupt_status & RX_CTS_WAKE_UP_STS) { /* Wake-up IT has occurred */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3093 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3094 it_wakeup_identified = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3095 uart_sleep_timer_enabled = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3096 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3097 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3098 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3099 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3100 (*(uart->interrupt_handler)) (UA_UART_1, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3101 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3102 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3103 DISABLE_WAKE_UP_INTERRUPT (uart); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3104 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3105 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3106 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3107 * If no wake-up interrupt has been detected, check UART for other |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3108 * interrupt causes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3109 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3110 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3111 if (!it_wakeup_identified) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3112 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3113 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3114 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3115 if (!(interrupt_status & IT_NOT_PENDING)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3116 (*(uart->interrupt_handler)) (UA_UART_1, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3117 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3118 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3119 uart_modem_spurious_interrupts++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3120 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3121 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3122 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3123 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3124 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3125 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3126 * SER_uart_irda_handler |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3127 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3128 * Purpose : UART IrDA interrupt handler. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3129 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3130 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3131 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3132 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3133 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3134 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3135 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3136 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3137 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3138 SER_uart_irda_handler (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3139 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3140 SYS_UWORD8 interrupt_status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3141 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3142 SYS_BOOL it_wakeup_identified; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3143 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3144 it_wakeup_identified = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3145 uart = &(int_uart[UA_UART_0]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3146 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3147 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3148 * Check first for a wake-up interrupt. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3149 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3150 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3151 interrupt_status = READ_UART_REGISTER (uart, SSR); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3152 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3153 if (interrupt_status & RX_CTS_WAKE_UP_STS) { /* Wake-up IT has occurred */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3154 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3155 it_wakeup_identified = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3156 uart_sleep_timer_enabled = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3157 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3158 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3159 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3160 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3161 (*(uart->interrupt_handler)) (UA_UART_0, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3162 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3163 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3164 DISABLE_WAKE_UP_INTERRUPT (uart); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3165 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3166 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3167 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3168 * If no wake-up interrupt has been detected, check UART for other |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3169 * interrupt causes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3170 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3171 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3172 if (!it_wakeup_identified) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3173 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3174 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3175 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3176 if (!(interrupt_status & IT_NOT_PENDING)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3177 (*(uart->interrupt_handler)) (UA_UART_0, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3178 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3179 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3180 uart_irda_spurious_interrupts++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3181 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3182 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3183 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3184 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3185 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3186 #if (CHIPSET == 12) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3187 /******************************************************************************* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3188 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3189 * SER_uart_modem2_handler |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3190 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3191 * Purpose : UART IrDA interrupt handler. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3192 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3193 * Arguments: In : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3194 * Out: none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3195 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3196 * Returns : none |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3197 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3198 ******************************************************************************/ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3199 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3200 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3201 SER_uart_modem2_handler (void) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3202 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3203 SYS_UWORD8 interrupt_status; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3204 t_uart *uart; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3205 SYS_BOOL it_wakeup_identified; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3206 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3207 it_wakeup_identified = 0; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3208 uart = &(int_uart[UA_UART_2]); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3209 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3210 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3211 * Check first for a wake-up interrupt. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3212 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3213 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3214 interrupt_status = READ_UART_REGISTER (uart, SSR); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3215 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3216 if (interrupt_status & RX_CTS_WAKE_UP_STS) { /* Wake-up IT has occurred */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3217 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3218 it_wakeup_identified = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3219 uart_sleep_timer_enabled = 1; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3220 #ifdef BTEMOBILE |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3221 if (uart->flow_type == BLUETOOTH_HCI_FLOW) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3222 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3223 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3224 (*(uart->interrupt_handler)) (UA_UART_2, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3225 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3226 #endif /* BTEMOBILE */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3227 DISABLE_WAKE_UP_INTERRUPT (uart); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3228 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3229 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3230 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3231 * If no wake-up interrupt has been detected, check UART for other |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3232 * interrupt causes. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3233 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3234 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3235 if (!it_wakeup_identified) { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3236 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3237 interrupt_status = READ_UART_REGISTER (uart, IIR) & IIR_BITS_USED; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3238 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3239 if (!(interrupt_status & IT_NOT_PENDING)) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3240 (*(uart->interrupt_handler)) (UA_UART_2, interrupt_status); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3241 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3242 else |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3243 uart_modem2_spurious_interrupts++; |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3244 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3245 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3246 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3247 #endif |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3248 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3249 /* |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3250 * Temporary functions. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3251 * |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3252 * FreeCalypso note: I'll put them back in if they are actually needed. |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3253 */ |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3254 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3255 #if 0 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3256 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3257 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3258 UT_Init (int device_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3259 int baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3260 void (callback_function (void))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3261 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3262 SER_tr_Init (SER_PROTOCOL_STACK, baudrate, callback_function); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3263 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3264 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3265 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3266 UT_ReadNChars (int device_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3267 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3268 SYS_UWORD32 chars_to_read) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3269 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3270 return (SER_tr_ReadNChars (SER_PROTOCOL_STACK, buffer, chars_to_read)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3271 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3272 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3273 SYS_UWORD32 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3274 UT_WriteNChars (int device_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3275 char *buffer, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3276 SYS_UWORD32 chars_to_write) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3277 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3278 return (SER_tr_WriteNChars (SER_PROTOCOL_STACK, buffer, chars_to_write)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3279 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3280 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3281 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3282 UT_WriteChar (int device_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3283 char character) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3284 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3285 SER_tr_WriteChar (SER_PROTOCOL_STACK, character); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3286 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3287 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3288 void |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3289 UT_WriteString (int device_id, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3290 char *buffer) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3291 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3292 SER_tr_WriteString (SER_PROTOCOL_STACK, buffer); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3293 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3294 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3295 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3296 UF_Init (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3297 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3298 return (SER_fd_Init ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3299 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3300 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3301 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3302 UF_Enable (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3303 SYS_BOOL enable) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3304 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3305 return (SER_fd_Enable (enable)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3306 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3307 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3308 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3309 UF_SetComPar (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3310 T_baudrate baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3311 T_bitsPerCharacter bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3312 T_stopBits sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3313 T_parity parity) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3314 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3315 return (SER_fd_SetComPar (baudrate, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3316 bpc, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3317 sb, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3318 parity)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3319 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3320 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3321 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3322 UF_SetBuffer (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3323 SYS_UWORD16 bufSize, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3324 SYS_UWORD16 rxThreshold, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3325 SYS_UWORD16 txThreshold) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3326 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3327 return (SER_fd_SetBuffer (bufSize, rxThreshold, txThreshold)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3328 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3329 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3330 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3331 UF_SetFlowCtrl (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3332 T_flowCtrlMode fcMode, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3333 SYS_UWORD8 XON, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3334 SYS_UWORD8 XOFF) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3335 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3336 return (SER_fd_SetFlowCtrl (fcMode, XON, XOFF)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3337 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3338 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3339 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3340 UF_SetEscape (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3341 SYS_UWORD8 escChar, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3342 SYS_UWORD16 guardPeriod) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3343 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3344 return (SER_fd_SetEscape (escChar, guardPeriod)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3345 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3346 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3347 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3348 UF_InpAvail (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3349 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3350 return (SER_fd_InpAvail ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3351 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3352 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3353 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3354 UF_OutpAvail (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3355 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3356 return (SER_fd_OutpAvail ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3357 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3358 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3359 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3360 UF_ReadData (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3361 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3362 void (readOutFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3363 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3364 SYS_UWORD8 nsource, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3365 SYS_UWORD8 *source[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3366 SYS_UWORD16 size[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3367 SYS_UWORD32 state))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3368 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3369 return (SER_fd_ReadData (suspend, readOutFunc)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3370 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3371 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3372 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3373 UF_WriteData (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3374 T_suspendMode suspend, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3375 void (writeInFunc (SYS_BOOL cldFromIrq, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3376 T_reInstMode *reInstall, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3377 SYS_UWORD8 ndest, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3378 SYS_UWORD8 *dest[], |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3379 SYS_UWORD16 size[]))) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3380 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3381 return (SER_fd_WriteData (suspend, writeInFunc)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3382 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3383 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3384 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3385 UF_StopRec (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3386 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3387 return (SER_fd_StopRec ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3388 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3389 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3390 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3391 UF_StartRec (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3392 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3393 return (SER_fd_StartRec ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3394 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3395 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3396 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3397 UF_GetLineState (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3398 SYS_UWORD32 *state) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3399 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3400 return (SER_fd_GetLineState (state)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3401 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3402 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3403 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3404 UF_SetLineState (SYS_UWORD8 deviceNo, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3405 SYS_UWORD32 state, |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3406 SYS_UWORD32 mask) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3407 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3408 return (SER_fd_SetLineState (state, mask)); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3409 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3410 |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3411 short |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3412 UF_CheckXEmpty (SYS_UWORD8 deviceNo) |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3413 { |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3414 return (SER_fd_CheckXEmpty ()); |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3415 } |
ae254ffeaec3
AT command interface works!
Space Falcon <falcon@ivan.Harhan.ORG>
parents:
diff
changeset
|
3416 #endif |