comparison src/cs/drivers/drv_core/dsp_dwnld/leadapi.h @ 0:b6a5e36de839

src/cs: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:39:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b6a5e36de839
1 /*******************************************************************************
2 TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
3
4 Property of Texas Instruments -- For Unrestricted Internal Use Only
5 Unauthorized reproduction and/or distribution is strictly prohibited. This
6 product is protected under copyright law and trade secret law as an
7 unpublished work. Created 1987, (C) Copyright 1997 Texas Instruments. All
8 rights reserved.
9
10
11 Filename : leadapi.h
12
13 Description : Boot the LEAD - header file
14
15 Target : ARM
16
17 Project :
18
19 Author : A0917556
20
21 Version number : 1.8
22
23 Date and time : 02/22/01 11:54:48
24
25 Previous delta : 01/22/01 10:32:42
26
27 SCCS file : /db/gsm_asp/db_ht96/dsp_0/gsw/rel_0/mcu_l1/release_gprs/RELEASE_GPRS/drivers1/common/SCCS/s.leadapi.h
28
29 Sccs Id (SID) : '@(#) leadapi.h 1.8 02/22/01 11:54:48 '
30
31
32 *****************************************************************************/
33
34 #include "chipset.cfg"
35
36 #define NULL 0
37
38 #define APIF_ADDR 0xFFD00000L
39 #define BASE_API_ARM APIF_ADDR /* API RAM for ARM */
40 #if (CHIPSET == 4)
41 #define BASE_API_LEAD 0xE800 /* API RAM for Lead */
42 #elif (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)
43 #define BASE_API_LEAD 0xE000 /* API RAM for Lead */
44 #else
45 #define BASE_API_LEAD 0xF800 /* API RAM for Lead */
46 #endif
47
48 #define DOWNLOAD_EXT_PAGE (APIF_ADDR + 0x0FF8) /* Address of the extended DSP page of the */
49 #define DOWNLOAD_SIZE (APIF_ADDR + 0x0FFA) /* Address of the download size variable */
50 #define DOWNLOAD_ADDR (APIF_ADDR + 0x0FFC) /* Address of the download address variable */
51 #define DOWNLOAD_STATUS (APIF_ADDR + 0x0FFE) /* Address of the download status variable */
52
53 /* Maximum size of a block which can be copied into the API RAM */
54
55 #define MAX_BLOCK_SIZE 0x7F0
56 #define MAX_UINT 65535
57
58 /* Possible values for the download status */
59
60 #define LEAD_READY 1
61 #define BLOCK_READY 2
62 #define PROGRAM_DONE 3
63 #define PAGE_SELECTION 4
64
65
66 // Constants for timeout
67 #define LA_TIMEOUT 10000
68 #define LA_SUCCESS 0
69 #define LA_ERR_TIMEOUT 1
70
71 // Constants for error
72 #define LA_BAD_EXT_VALUE 2
73 #define LA_BAD_VERSION 3
74 #define LA_BAD_TAG 4
75
76 // Prototypes
77 void LA_InitialLeadBoot16(const unsigned char bootCode[]);
78 void LA_InitialLeadBoot(const unsigned char bootCode[]);
79 short LA_LoadPage16(const unsigned char code[], SYS_UWORD16 page, SYS_UWORD16 start);
80 short LA_LoadPage(const unsigned char code[], SYS_UWORD16 page, SYS_UWORD16 start);
81 void LA_ResetLead(void);
82 void LA_StartLead(SYS_UWORD16 pll);
83
84 extern const unsigned char bootCode[];
85
86 /*
87 * Global variables
88 */
89 #ifdef LEADAPI_C
90 #define LA_GLOBAL
91 #else
92 #define LA_GLOBAL extern
93 #endif
94
95 LA_GLOBAL volatile unsigned leadInt;