annotate gsm-fw/L1/dsp/leadapi.h @ 560:85562a6b6356

gsm-fw/L1/dsp/leadboot.c: import from the LoCosto source
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 04 Aug 2014 21:43:47 +0000
parents fba5efca2293
children a418c48046ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
558
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
1 /*******************************************************************************
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 Property of Texas Instruments -- For Unrestricted Internal Use Only
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 Unauthorized reproduction and/or distribution is strictly prohibited. This
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 product is protected under copyright law and trade secret law as an
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 unpublished work. Created 1987, (C) Copyright 1997 Texas Instruments. All
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
8 rights reserved.
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
9
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
10
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
11 Filename : leadapi.h
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
12
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 Description : Boot the LEAD - header file
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 Target : ARM
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
16
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
17 Project :
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 Author : A0917556
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21 Version number : 1.8
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
23 Date and time : 02/22/01 11:54:48
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 Previous delta : 01/22/01 10:32:42
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
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
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
28
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
29 Sccs Id (SID) : '@(#) leadapi.h 1.8 02/22/01 11:54:48 '
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32 *****************************************************************************/
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #define NULL 0
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36 #define APIF_ADDR 0xFFD00000L
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #define BASE_API_ARM APIF_ADDR /* API RAM for ARM */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #if (CHIPSET == 4)
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #define BASE_API_LEAD 0xE800 /* API RAM for Lead */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #elif (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12)
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #define BASE_API_LEAD 0xE000 /* API RAM for Lead */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42 #else
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #define BASE_API_LEAD 0xF800 /* API RAM for Lead */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #endif
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #define DOWNLOAD_EXT_PAGE (APIF_ADDR + 0x0FF8) /* Address of the extended DSP page of the */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 #define DOWNLOAD_SIZE (APIF_ADDR + 0x0FFA) /* Address of the download size variable */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
48 #define DOWNLOAD_ADDR (APIF_ADDR + 0x0FFC) /* Address of the download address variable */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
49 #define DOWNLOAD_STATUS (APIF_ADDR + 0x0FFE) /* Address of the download status variable */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
50
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
51 /* Maximum size of a block which can be copied into the API RAM */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #define MAX_BLOCK_SIZE 0x7F0
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #define MAX_UINT 65535
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 /* Possible values for the download status */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #define LEAD_READY 1
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 #define BLOCK_READY 2
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
60 #define PROGRAM_DONE 3
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 #define PAGE_SELECTION 4
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 // Constants for timeout
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #define LA_TIMEOUT 10000
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 #define LA_SUCCESS 0
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #define LA_ERR_TIMEOUT 1
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
68
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
69 // Constants for error
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #define LA_BAD_EXT_VALUE 2
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #define LA_BAD_VERSION 3
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72 #define LA_BAD_TAG 4
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 // Prototypes
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75 void LA_InitialLeadBoot16(const unsigned char bootCode[]);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 void LA_InitialLeadBoot(const unsigned char bootCode[]);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 short LA_LoadPage16(const unsigned char code[], SYS_UWORD16 page, SYS_UWORD16 start);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 short LA_LoadPage(const unsigned char code[], SYS_UWORD16 page, SYS_UWORD16 start);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 void LA_ResetLead(void);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 void LA_StartLead(SYS_UWORD16 pll);
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 extern const unsigned char bootCode[];
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 /*
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85 * Global variables
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 */
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 #ifdef LEADAPI_C
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
88 #define LA_GLOBAL
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #else
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #define LA_GLOBAL extern
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #endif
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92
565bf963c3a2 gsm-fw/L1/dsp/leadapi.[ch]: import from Leonardo semi-src
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 LA_GLOBAL volatile unsigned leadInt;