comparison src/g23m-fad/l2r/l2r_tim.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 : CSD (8411)
4 | Modul : L2r_tim.c
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 timer handling functions
18 | for the component L2R of the base station
19 +-----------------------------------------------------------------------------
20 */
21
22 #ifndef L2R_TIM_C
23 #define L2R_TIM_C
24 #endif
25
26 #define ENTITY_L2R
27
28 /*==== INCLUDES ===================================================*/
29
30 #include <string.h>
31 #include "typedefs.h"
32 #include "pconst.cdg"
33 #include "vsi.h"
34 #include "macdef.h"
35 #include "custom.h"
36 #include "gsm.h"
37 #include "cus_l2r.h"
38 #include "cnf_l2r.h"
39 #include "mon_l2r.h"
40 #include "prim.h"
41 #include "pei.h"
42 #include "tok.h"
43 #include "dti.h" /* functionality of the dti library */
44
45 #include "cl_ribu.h"
46 #include "l2r.h"
47
48 /*==== EXPORT =====================================================*/
49 /*==== PRIVAT =====================================================*/
50 /*==== VARIABLES ==================================================*/
51 /*==== FUNCTIONS ==================================================*/
52
53 /*
54 +------------------------------------------------------------------------------
55 | Function : tim_tup_snd
56 +------------------------------------------------------------------------------
57 | Description : Timeout of timer TUP_SND
58 |
59 | Parameters : -
60 |
61 |
62 | Return : -
63 +------------------------------------------------------------------------------
64 */
65
66 GLOBAL void tim_tup_snd (void)
67 {
68 T_UP *dup = &l2r_data->up;
69
70 TRACE_FUNCTION ("tim_tup_snd()");
71
72 if (GET_STATE (UP) EQ UP_CONNECTED AND GET_STATE (UP_LL) EQ ISW_WAIT)
73 {
74 if (up_some_data_to_send())
75 {
76 if (dup->LLFlow EQ FL_INACTIVE)
77 up_send_prim_timeout ();
78 else
79 up_send_empty_frame(dup->LastSentSa, dup->LastSentSb, dup->MrgFlow);
80
81 if (!dup->RiBu.idx.filled)
82 SET_STATE (UP_LL, ISW_IDLE)
83 else
84 SET_STATE (UP_LL, ISW_SEND)
85 }
86 else
87 TIMERSTART(TIMER_TUP_SND, LL_TO);
88 }
89 }