annotate gsm-fw/L1/include/l1_macro.h @ 1034:405b5469abc4 default tip

top README: repository change notice
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 12 Jun 2016 19:06:34 +0000
parents 30f2e994fcb0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /************* Revision Controle System Header *************
530
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
2 * GSM Layer 1 software
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 * L1_MACRO.H
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 *
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 * Filename l1_macro.h
530
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
6 * Copyright 2003 (C) Texas Instruments
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 *
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 ************* Revision Controle System Header *************/
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 #include "l1_confg.h"
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 #if(L1_DYN_DSP_DWNLD == 1)
535
30f2e994fcb0 gsm-fw/L1/include/l1_macro.h: #include lines preened
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 530
diff changeset
12 #include "../dyn_dwl_include/l1_dyn_dwl_const.h"
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #endif
535
30f2e994fcb0 gsm-fw/L1/include/l1_macro.h: #include lines preened
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 530
diff changeset
14 #include "l1_types.h"
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16 #if (TRACE_TYPE==5) && NUCLEUS_TRACE
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 //WARNING : this type of trace takes a lot of space in data RAM (~16kB)
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 // switch for Nucleus debugging messages.
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #define NU_ALLOC_ERR 0
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #define NU_DEALLOC_ERR 1
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #define NU_RCVE_QUEUE_ERR 2
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 #define NU_SEND_QUEUE_ERR 3
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #define NU_OBTA_SEMA_ERR 4
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #define NU_RLSE_SEMA_ERR 5
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
27 // Nucleus debug function.
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28 #define DEBUGMSG(status,type) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 if(status) switch(type) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 { \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 case NU_ALLOC_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 printf("NU mem. allocation error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 case NU_DEALLOC_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 printf("NU mem. deallocation error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 case NU_RCVE_QUEUE_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 printf("NU rcve queue error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 case NU_SEND_QUEUE_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 printf("NU send queue error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 case NU_OBTA_SEMA_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 printf("NU obtain semaph. error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 case NU_RLSE_SEMA_ERR: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 printf("NU release semaph. error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 default: \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 printf("Unknown error %d file %s line %d\n", status,__FILE__,__LINE__); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 exit(0); \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 break; \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 }
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 #else
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #define DEBUGMSG(status,type)
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 #endif
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 /************************************************************/
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 /* Macros for FAST INTEGER MODULO implementation. */
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 /************************************************************/
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #define IncMod(operand, increment, modulo) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 if( (operand += increment) >= modulo ) operand -= modulo
530
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
75
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 // Define MACRO for selecting the min. time to next task.
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #define Select_min_time(Task_Time, Min_Time) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 if(Task_Time < Min_Time) Min_Time = Task_Time;
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 /************************************************************/
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 /* Macros for MCU/DSP API address conversion . */
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 /************************************************************/
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 #define API_address_dsp2mcu(dsp_address) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 (MCU_API_BASE_ADDRESS + ((API)((dsp_address) - DSP_API_BASE_ADDRESS) * 2))
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #define API_address_mcu2dsp(mcu_address) \
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 (DSP_API_BASE_ADDRESS + ((UWORD32)((mcu_address) - MCU_API_BASE_ADDRESS) / 2))
530
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
90
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
91
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
92
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
93
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
94 /* Added temporirly for RF_KEypad build */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
95
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
96 #if (L1_RF_KBD_FIX == 1)
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
97
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
98 #if(OP_L1_STANDALONE == 1)
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
99
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
100 #if 0
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
101 typedef struct
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
102 {
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
103 // T_RVF_MB_ID prim_id;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
104 // T_RVF_ADDR_ID addr_id;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
105 // BOOL swe_is_initialized;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
106 // T_RVM_RETURN (*error_ft)(T_RVM_NAME swe_name,
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
107 // T_RVM_RETURN error_cause,
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
108 // T_RVM_ERROR_TYPE error_type,
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
109 // T_RVM_STRING error_msg);
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
110 #if ((CHIPSET == 12) || (CHIPSET == 15))
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
111 // T_KPD_RECEIVED_KEY_INFO received_key_info[KPD_MAX_DETECTABLE];
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
112 //UINT8 nb_active_keys;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
113 UWORD16 repeat_time;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
114 UWORD16 long_time;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
115 #endif
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
116 } T_KPD_ENV_CTRL_BLK_L1;
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
117
115
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 #endif
1e41550feec5 nuc-fw: Init_Target() reconstructed
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119
530
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
120 // typedef unsigned char KPD_CORRECTION_RATIO; //UWORD8 //omaps00090550
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
121 void kpd_timer_modify(UWORD8 ratio,UWORD32 frameNumber); //omaps00090550
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
122 #define KBR_DEBOUNCING_TIME (MEM_KEYBOARD + 0x02) /* KBR debouncing time reg */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
123 #define KPD_DEBOUNCING_TIME (0x3F)
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
124 #define KBR_LONG_KEY_TIME (MEM_KEYBOARD + 0x04) /* KBR long key time reg */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
125 #define KBR_TIME_OUT (MEM_KEYBOARD + 0x06) /* KBR Time out reg */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
126 #define KBR_CTRL_REG (MEM_KEYBOARD + 0x00) /* KBR control reg */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
127 #define KBR_STATE_MACHINE_STATUS (MEM_KEYBOARD + 0x0E) /* KBR state machine status reg */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
128 #define KPD_CLK_DIV32 4
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
129 #define KPD_CLOCK_DIVIDER KPD_CLK_DIV32
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
130
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
131 #define SetGroupBits16(registre,position,number,value) {\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
132 UINT16 tmp=registre;\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
133 volatile UINT16 tmpvalue;\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
134 tmpvalue = (value<<(16-(number)));\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
135 tmpvalue = (tmpvalue>>(16-(number)));\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
136 tmp&=~((0xFFFF>>(16-(number)))<<(position));\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
137 tmp|=((tmpvalue&(0xFFFF>>(16-(number))))<<(position));\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
138 registre=tmp;\
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
139 }
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
140 #endif/* #if(OP_L1_STANDALONE == 1) */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
141
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
142 #endif /* #if (L1_RF_KBD_FIX == 1) */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
143 /* Added temporirly for RF_KEypad build */
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
144
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
145
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
146
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
147
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
148
25a7fe25864c gsm-fw/L1/include: switch to LoCosto versions of all header files
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 151
diff changeset
149