FreeCalypso > hg > fc-selenite
comparison src/g23m-fad/t30/t30_msgs.c @ 1:d393cd9bb723
src/g23m-*: initial import from Magnetite
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 04:40:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:b6a5e36de839 | 1:d393cd9bb723 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM-F&D (8411) | |
4 | Modul : t30_msgs | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : This Modul defines the functions for processing | |
18 | of incomming signals for the component T30 | |
19 | of the mobile station | |
20 +----------------------------------------------------------------------------- | |
21 */ | |
22 | |
23 #ifndef T30_MSGS_C | |
24 #define T30_MSGS_C | |
25 #endif | |
26 | |
27 #define ENTITY_T30 | |
28 | |
29 /*==== INCLUDES ===================================================*/ | |
30 | |
31 #include <string.h> | |
32 #include <stdlib.h> | |
33 #include <stddef.h> | |
34 #include "typedefs.h" | |
35 #include "pcm.h" | |
36 #include "vsi.h" | |
37 #include "macdef.h" | |
38 #include "pconst.cdg" | |
39 #include "mconst.cdg" | |
40 #include "message.h" | |
41 #include "ccdapi.h" | |
42 #include "custom.h" | |
43 #include "gsm.h" | |
44 #include "prim.h" | |
45 #include "cnf_t30.h" | |
46 #include "mon_t30.h" | |
47 #include "pei.h" | |
48 #include "tok.h" | |
49 #include "dti.h" /* functionality of the dti library */ | |
50 #include "t30.h" | |
51 | |
52 /*==== CONST =======================================================*/ | |
53 | |
54 /*==== TYPES =======================================================*/ | |
55 | |
56 /*==== VAR EXPORT ==================================================*/ | |
57 | |
58 /*==== VAR LOCAL ===================================================*/ | |
59 | |
60 /*==== FUNCTIONS ===================================================*/ | |
61 | |
62 /* | |
63 +--------------------------------------------------------------------+ | |
64 | PROJECT : GSM-F&D (8411) MODULE : T30_MSGS | | |
65 | STATE : code ROUTINE : sig_mux_msg_msg_ind | | |
66 +--------------------------------------------------------------------+ | |
67 | |
68 PURPOSE : Process signal MSG_IND received from process MUX. | |
69 The received fax data are passed to T30. | |
70 */ | |
71 | |
72 GLOBAL void sig_mux_msg_msg_ind (T_FAD_DATA_IND *fad_data_ind) | |
73 { | |
74 TRACE_FUNCTION ("sig_mux_msg_msg_ind()"); | |
75 | |
76 if (t30_data->bitorder & FBO_REV_DATA) /* reverse the bit order of each byte */ | |
77 { | |
78 USHORT i; | |
79 | |
80 for (i = 0; i < fad_data_ind->sdu.l_buf >> 3; i++) | |
81 { | |
82 fad_data_ind->sdu.buf[i] = BIT_MIRROR[fad_data_ind->sdu.buf[i]]; | |
83 } | |
84 } | |
85 sig_msg_ker_mdat_ind (fad_data_ind); | |
86 } | |
87 | |
88 /* | |
89 +--------------------------------------------------------------------+ | |
90 | PROJECT : GSM-F&D (8411) MODULE : T30_MSGS | | |
91 | STATE : code ROUTINE : sig_ker_msg_mdat_req| | |
92 +--------------------------------------------------------------------+ | |
93 | |
94 PURPOSE : Process converted DTI data received from process KER. | |
95 The received fax data are passed to FAD. | |
96 */ | |
97 | |
98 GLOBAL void sig_ker_msg_mdat_req (T_FAD_DATA_REQ *fad_data_req) | |
99 { | |
100 TRACE_FUNCTION ("sig_ker_msg_mdat_req()"); | |
101 | |
102 if (t30_data->bitorder & FBO_REV_DATA) /* reverse the bit order of each byte */ | |
103 { | |
104 USHORT i; | |
105 | |
106 for (i = 0; i < fad_data_req->sdu.l_buf >> 3; i++) | |
107 { | |
108 fad_data_req->sdu.buf[i] = BIT_MIRROR[fad_data_req->sdu.buf[i]]; | |
109 } | |
110 } | |
111 sig_msg_mux_msg_req (fad_data_req); | |
112 } | |
113 |