OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [lpc2xxx/] [var/] [current/] [include/] [lpc2xxx_iap.h] - Blame information for rev 791

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_LPC2XXX_IAP_H
2
#define CYGONCE_LPC2XXX_IAP_H
3
//==========================================================================
4
//
5
//      lpc2xxx_iap.h
6
//
7
//      LPC2XXX IAP (In Application Programming) interface
8
//
9
//==========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
11
// -------------------------------------------                              
12
// This file is part of eCos, the Embedded Configurable Operating System.   
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under    
16
// the terms of the GNU General Public License as published by the Free     
17
// Software Foundation; either version 2 or (at your option) any later      
18
// version.                                                                 
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT      
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
23
// for more details.                                                        
24
//
25
// You should have received a copy of the GNU General Public License        
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
28
//
29
// As a special exception, if other files instantiate templates or use      
30
// macros or inline functions from this file, or you compile this file      
31
// and link it with other works to produce a work based on this file,       
32
// this file does not by itself cause the resulting work to be covered by   
33
// the GNU General Public License. However the source code for this file    
34
// must still be made available in accordance with section (3) of the GNU   
35
// General Public License v2.                                               
36
//
37
// This exception does not invalidate any other reasons why a work based    
38
// on this file might be covered by the GNU General Public License.         
39
// -------------------------------------------                              
40
// ####ECOSGPLCOPYRIGHTEND####                                              
41
//==========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):    Sergei Gavrikov
45
// Contributors: Sergei Gavrikov
46
// Date:         2007-09-20
47
// Purpose:
48
// Description:
49
// Usage:        #include <cyg/hal/lpc2xxx_iap.h>
50
//
51
//####DESCRIPTIONEND####
52
//
53
//==========================================================================
54
 
55
#include <cyg/infra/cyg_type.h>
56
 
57
//----------------------------------------------------------------------------
58
// The LPC2XXX IAP entry point is at 0x7FFFFFF0 if you wish to call the IAP
59
// functions from a THUMB function or at 0x7FFFFFF1 if you wish to call from
60
// an ARM function.
61
 
62
#define HAL_LPC2XXX_IAP_ENTRY_THUMB     0x7FFFFFF0u
63
#define HAL_LPC2XXX_IAP_ENTRY_ARM       0x7FFFFFF1u
64
 
65
#ifndef HAL_LPC2XXX_IAP_ENTRY_DEFAULT
66
#  define HAL_LPC2XXX_IAP_ENTRY_DEFAULT HAL_LPC2XXX_IAP_ENTRY_ARM
67
#endif
68
 
69
// LPC2XXX IAP return code
70
#define HAL_LPC2XXX_IAP_RETURN_CMD_SUCCESS              0
71
#define HAL_LPC2XXX_IAP_RETURN_INVALID_COMMAND          1
72
#define HAL_LPC2XXX_IAP_RETURN_SRC_ADDR_ERROR           2
73
#define HAL_LPC2XXX_IAP_RETURN_DST_ADDR_ERROR           3
74
#define HAL_LPC2XXX_IAP_RETURN_SRC_ADDR_NOT_MAPPED      4       
75
#define HAL_LPC2XXX_IAP_RETURN_DST_ADDR_NOT_MAPPED      5
76
#define HAL_LPC2XXX_IAP_RETURN_COUNT_ERROR              6
77
#define HAL_LPC2XXX_IAP_RETURN_INVALID_SECTOR           7
78
#define HAL_LPC2XXX_IAP_RETURN_SECTOR_NOT_BLANK         8
79
#define HAL_LPC2XXX_IAP_RETURN_SECTOR_NOT_PREPARED      9
80
#define HAL_LPC2XXX_IAP_RETURN_COMPARE_ERROR            10
81
#define HAL_LPC2XXX_IAP_RETURN_BUSY                     11
82
#define HAL_LPC2XXX_IAP_RETURN_PARAM_ERROR              12
83
#define HAL_LPC2XXX_IAP_RETURN_ADDR_ERROR               13
84
#define HAL_LPC2XXX_IAP_RETURN_ADDR_NOT_MAPPED          14
85
#define HAL_LPC2XXX_IAP_RETURN_CMD_LOCKED               15
86
#define HAL_LPC2XXX_IAP_RETURN_INVALID_CODE             16
87
#define HAL_LPC2XXX_IAP_RETURN_INVALID_BAUD_RATE        17
88
#define HAL_LPC2XXX_IAP_RETURN_INVALID_STOP_BIT         18
89
 
90
// LPC2XXX IAP commands
91
#define HAL_LPC2XXX_IAP_COMMAND_PREPARE_SECTORS         50
92
#define HAL_LPC2XXX_IAP_COMMAND_COPY_RAM_TO_FLASH       51
93
#define HAL_LPC2XXX_IAP_COMMAND_ERASE_SECTORS           52
94
#define HAL_LPC2XXX_IAP_COMMAND_BLANK_CHECK_SECTORS     53
95
#define HAL_LPC2XXX_IAP_COMMAND_READ_PART_ID            54
96
#define HAL_LPC2XXX_IAP_COMMAND_READ_BOOT_CODE_VERSION  55
97
#define HAL_LPC2XXX_IAP_COMMAND_COMPARE                 56
98
 
99
cyg_uint32
100
hal_lpc2xxx_iap_call (cyg_uint32 cmd, cyg_uint32 par0, cyg_uint32 par1,
101
                      cyg_uint32 par2, cyg_uint32 par3, cyg_uint32 * ret);
102
 
103
#endif//CYGONCE_LPC2XXX_IAP_H
104
// EOF lpc2xxx_iap.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.