annotate gsm-fw/L1/tpudrv/tpudrv.h @ 1030:194967e11b2b

fc-shell: tch record and tch play reworked for libgsm-compatible file format
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 31 May 2016 18:39:06 +0000
parents 3a0ce0ea4035
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /************* Revision Controle System Header *************
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
2 * GSM Layer 1 software
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 *
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 * Filename tpudrv.h
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
5 * Copyright 2003 (C) Texas Instruments
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 *
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 ************* Revision Controle System Header *************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10 * Device addresses - GCS000
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
11 */
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
12 // GSM 1.5 : TPU / TSP addresses
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 //-------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #if ((CHIPSET ==2) || (CHIPSET == 3) || (CHIPSET == 4))
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
16 #define TPU_ADDR 0xFFFE0000L //omaps00090550 // Hercule / Ulysse / Samson
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18 #define TPU_RAM (TPU_ADDR + 0x1400)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #define TPU_REG (TPU_ADDR + 0x1000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 #define TSP_REG (TPU_ADDR + 0x0800)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #define TPU_TIM (TPU_ADDR + 0x2000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24 #elif ((CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12))
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
25 #define TPU_ADDR 0xFFFF0000L // Strobe 1 address //omaps00090550
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
27 #define TPU_RAM 0xFFFF9000L // TPU RAM //omaps00090550
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 #define TPU_REG (TPU_ADDR + 0x1000) // TPU register
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
30 #define TSP_REG 0xFFFE0800L // TSP register //omaps00090550
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
31 #define TPU_TIM 0xFFFE2000L // ULPD register //omaps00090550
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
32
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
33 #elif (CHIPSET == 15)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
34 #define TPU_ADDR 0xFFFFF000L // Strobe 1 address //omaps00090550
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
35
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
36 #define TPU_RAM 0xFFFF9000L // TPU RAM //omaps00090550
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
37
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
38 #define TPU_REG (TPU_ADDR) // TPU register
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
39
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
40 // TSP should be removed for Locosto. Leaving it as such as the TPU drivers are not yet ported.
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
41 #define TSP_REG 0xFFFE0800L // TSP register //omaps00090550
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
42 #define TPU_TIM 0xFFFE2000L // ULPD register //omaps00090550
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 * Macros for defining TPU instructions
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
49 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50 #define TPU_SLEEP 0
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 #define TPU_MOVE(addr,data) (0x8000 | ((data)<<5) | (addr))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #define TPU_AT(time) (0x2000 | (((time + 5000) % 5000)))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #define TPU_FAT(time) (0x2000 | (time)) // Fast version without modulo
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #define TPU_SYNC(time) (0x6000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55 #define TPU_WAIT(time) (0xA000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #define TPU_OFFSET(time) (0x4000 | (time))
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 #define MOD5000(a) (((a) + 5000) % 5000)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 * TSP registers - defined in GCS004 - Time Serial Port
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
62 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 * in TPU address space
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 // GSM 1.5 : TSP_TX_REG_1/2/3/4 instead of TSP_TX_U/M/L
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
67 // added TSP_SPI_SET1/2/3 to ctrl up to 5 periph.
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68 //-----------------------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 #define TSP_CTRL1 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #define TSP_CTRL2 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #define TSP_TX_REG_1 0x04
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #define TSP_TX_REG_2 0x03
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #define TSP_TX_REG_3 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 #define TSP_TX_REG_4 0x05
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 #define TSP_ACT 0x06
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #define TSP_ACTX 0x07
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 #define TSP_GAUGING_EN 0x11
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #define TSP_SPI_SET1 0x09
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
79 #define TSP_SPI_SET2 0x0A
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #define TSP_SPI_SET3 0x0B
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 #define TPU_IT_DSP_PG 0x10
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #define TSP_GAUGING_EN 0x11
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 * in ARM address space - defined in HYP004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 #define TSP_RX_LSB (TSP_REG + 0x00)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #define TSP_RX_MSB (TSP_REG + 0x02)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #define TSP_TX_LSB (TSP_REG + 0x0c)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #define TSP_TX_MSB (TSP_REG + 0x0a)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 * TSP registers bit definitions
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
94 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
95 #define TC1_DEVICE0 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #define TC1_DEVICE1 0x20
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #define TC1_DEVICE2 0x40
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98 #define TC1_DEVICE3 0x60
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 #define TC1_DEVICE4 0x80
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #define TC2_RD 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 #define TC2_WR 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #define TC2_EDGE_TRIG 0x40
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 #define TC2_RISING 0x80
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104 #define TSP_CLK_RISE 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 #define TSP_ENA_POS 0x02
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 #define TSP_ENA_EDGE 0x04
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 #define GAUGING_START 0x01
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 #define GAUGING_STOP 0x00
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 #define TSP_ENA_POS_MSB 0x20
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
110
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
111
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
112
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
113 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 * TPU registers - defined in HYP002
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
115 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 // GSM 1.5 : TPU reg are 16-bit access
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117 //---------------------------------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 #define TPU_CTRL (TPU_REG + 0x00)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 #define TPU_INT_CTRL (TPU_REG + 0x02)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 #define TPU_INT_STAT (TPU_REG + 0x04)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 #define TPU_OFFSET_REG (TPU_REG + 0x0C)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
122 #define TPU_SYNCHRO_REG (TPU_REG + 0x0E)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 #define TPU_DSP_PG (TPU_REG + 0x20)
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
127
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
129 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130 * TPU control register bits
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
131 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 // GSM 1.5 : TPU bits changed
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 //---------------------------------------
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
134 #define TPU_CTRL_RESET 0x0001
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 #define TSP_CTRL_RESET 0x0080
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 #define TPU_CTRL_T_PAGE 0x0002
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 #define TPU_CTRL_T_ENBL 0x0004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 #define TPU_CTRL_D_ENBL 0x0010 // WARNING THIS BIT DOES NOT EXIST IN HYPERION
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 #define TPU_CTRL_SPI_RST 0x0080
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 #define TPU_CTRL_WAIT 0x0200
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 #define TPU_CTRL_CLK_EN 0x0400
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
142 #if (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15)
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
143 #define TPU_CTRL_FULL_WRITE 0x0800
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
149 /*
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 * TPU interrupt control register bits
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 /* WARNING BUG IN HYPERION. */
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
155 /* READING TPU_INT_CRTL, TPU_INT_ITP_M BIT CONTENTS AFFECTS THE TPU_INT_ITD_M VALUE. */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 #define TPU_INT_ITF_M 0x0001
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
158 #define TPU_INT_ITP_M 0x0002
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159 #define TPU_INT_ITD_M 0x0004
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 #define TPU_INT_ITD_F 0x0008 // WARNING THIS BIT DOES NOT EXIST IN HYPERION
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
162 #define INT_FRAME 4 /* TPU frame interrupt */
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
163 #define INT_PAGE 5 /* TPU page interrupt */
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
164 #define INT_TSP 3 /* TSP interrupt */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
166
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
168 #if ((ANALOG == 1) || (ANALOG == 2) || (ANALOG == 3) || (ANALOG==11))
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
169 // BB signals connected to serial link1
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
170 #define BULON 0x80 // bit6
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
171 #define BULCAL 0x40 // bit5
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 #define BULENA 0x20 // bit4
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 #define BDLON 0x10 // bit3
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174 #define BDLCAL 0x08 // bit2
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 #define BDLENA 0x04 // bit1
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
176 #define STARTADC 0x02 // bit0
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
177 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
179 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
180 /* #define START_ADC 0x01 // TSPact 8 omaps00090550*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
181 // TSPACT
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
182 #define REG_SPI_ACT_U 0x07
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
183 #define REG_SPI_ACT_L 0x06
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
185 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
186 #define TPU_CTRL_TPU_IDLE 0x0100
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
187
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
188 /*
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 * GSM RF programming times in quarter bits
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 /****************************** W A R N I N G !!! *************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 /******* This values are fine tuned for LAYER 1 . DO NOT MODIFY !!! *******/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195 /****** FOR ANY MODIFICATION , PLEASE CONTACT Texas Instruments Inc. ******/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 /**************************************************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 /**************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 /* TPU Macros: prototypes functions */
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202 /**************************************/
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 // TPU macros.
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204 //------------
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 void l1dmacro_reset_hw (UWORD32 servingCellOffset);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 void l1dmacro_init_hw (void);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
207 void l1dmacro_idle (void);
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 void l1dmacro_rx_synth (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 void l1dmacro_tx_synth (SYS_UWORD16 radio_freq);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
210
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
211
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
212 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
213 void l1dmacro_agc (SYS_UWORD16 radio_freq, WORD8 gain, UWORD8 lna, UWORD8 if_ctl);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
214 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
215 #if (RF_FAM != 61)
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 void l1dmacro_agc (SYS_UWORD16 radio_freq, WORD8 gain, UWORD8 lna);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
217 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
218
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 void l1dmacro_afc (SYS_UWORD16 afc_value, UWORD8 win_id);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
220 #if (L1_MADC_ON == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
221 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
222 void l1dmacro_rx_ms (SYS_UWORD16 radio_freq,UWORD8 adc_active);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
223 void l1dmacro_rx_fb (SYS_UWORD16 radio_freq,UWORD8 adc_active);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
224 void l1dmacro_rx_fb26 (SYS_UWORD16 radio_freq,UWORD8 adc_active);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
225 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
226 #else
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 void l1dmacro_rx_ms (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 void l1dmacro_rx_fb (SYS_UWORD16 radio_freq);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 void l1dmacro_rx_fb26 (SYS_UWORD16 radio_freq);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
230 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
231
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
232 void l1dmacro_offset (UWORD32 offset_value,
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233 WORD32 relative_time);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 void l1dmacro_synchro (UWORD32 when, UWORD32 value);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
235 #if (L1_MADC_ON == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
236 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
237 void l1dmacro_rx_sb (SYS_UWORD16 radio_freq,UWORD8 adc_active);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
238 void l1dmacro_rx_nb (SYS_UWORD16 radio_freq,UWORD8 adc_active, UWORD8 csf_filter_choice
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
239 #if (NEW_SNR_THRESHOLD == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
240 ,UWORD8 saic_flag
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
241 #endif /* NEW_SNR_THRESHOLD*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
242 );
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
243 #endif /* RF_FAM == 61*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
244 #else /* L1_MADC_ON == 1*/
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 void l1dmacro_rx_sb (SYS_UWORD16 radio_freq);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
246 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
247 void l1dmacro_rx_nb (SYS_UWORD16 radio_freq, UWORD8 csf_filter_choice);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
248 #else
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
249 void l1dmacro_rx_nb (SYS_UWORD16 radio_freq);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
250 #endif // RF_FAM
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
251 #endif // L1_MADC_ON
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
252
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
253 void l1dmacro_tx_nb (SYS_UWORD16 radio_freq, UWORD8 txpwr, UWORD8 adc_active);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
254 void l1dmacro_tx_ra (SYS_UWORD16 radio_freq, UWORD8 txpwr, UWORD8 adc_active);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
255
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
256 #if (L1_MADC_ON == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
257 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
258 void l1dmacro_adc_read_tx (UWORD32 when, UWORD8 tx_up_state);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
259 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
260 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
261 #if (RF_FAM != 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
262 void l1dmacro_adc_read_tx (UWORD32 when);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
263 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
264
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 void l1dmacro_adc_read_rx (void);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
266
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
267 #if (CODE_VERSION != SIMULATION)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
268 #if (L1_MADC_ON ==1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
269 void l1dmacro_adc_read_rx_cs_mode0(void);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
270 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
271 #endif
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
272
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
273
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 void l1dmacro_set_frame_it (void);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
275 void l1dmacro_init_hw_light (void);
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 #if TESTMODE
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
278 #if (L1_MADC_ON == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
279 #if (RF_FAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
280 void l1dmacro_rx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr,UWORD8 adc_active, UWORD8 csf_filter_choice
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
281 #if (NEW_SNR_THRESHOLD == 1)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
282 ,UWORD8 saic_flag
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
283 #endif /* NEW_SNR_THRESHOLD*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
284 );
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
285 #endif /* RF_FAM == 1*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
286 #else /* L1_MADC_ON == 1*/
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
287 #if (RF_RAM == 61)
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
288 void l1dmacro_rx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr, UWORD8 csf_filter_choice);
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
289 #else
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 void l1dmacro_rx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
291 #endif /* RF_FAM */
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
292 #endif /* L1_MADC_ON */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 void l1dmacro_tx_cont (SYS_UWORD16 radio_freq, UWORD8 txpwr);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 void l1dmacro_stop_cont (void);
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
295 #endif /* TESTMODE */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 * TPU prototypes
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
299 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
300 void TP_PageIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
301 void TP_FrameIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
302 void TP_PageIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
303 void TP_FrameIntHandler (void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 void TPU_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 void TSP_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 void TPU_ClkEnable(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 void TP_Reset(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 void TP_Enable(SYS_UWORD16 on);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 BOOL TPU_check_IT_DSP(void);
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 /*
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313 * TPUDRV global variables
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
314 */
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 #ifdef TPUDRV_C
554
3a0ce0ea4035 gsm-fw/L1/tpudrv/tpudrv.h: Leonardo version replaced with LoCosto-based one;
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 154
diff changeset
316 #define TP_GLOBAL
153
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
317 #else
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
318 #define TP_GLOBAL extern
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 #endif
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 TP_GLOBAL volatile UWORD32 TP_PageInt;
65efffcb28dc tpudrv*.h headers imported
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 TP_GLOBAL volatile UWORD32 TP_FrameInt;