FLASH/NOR: Remove useless file avrf.h
[openocd.git] / src / flash / nor / lpc2000.h
blobf1f90e70143ab72f7e3388fc235ff33608a67946
1 /***************************************************************************
2 * Copyright (C) 2005 by Dominic Rath *
3 * Dominic.Rath@gmx.de *
4 * *
5 * LPC1700 support Copyright (C) 2009 by Audrius Urmanavicius *
6 * didele.deze@gmail.com *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22 ***************************************************************************/
23 #ifndef LPC2000_H
24 #define LPC2000_H
26 typedef enum
28 lpc2000_v1,
29 lpc2000_v2,
30 lpc1700
31 } lpc2000_variant;
33 struct lpc2000_flash_bank
35 lpc2000_variant variant;
36 struct working_area *iap_working_area;
37 uint32_t cclk;
38 int cmd51_dst_boundary;
39 int cmd51_can_256b;
40 int cmd51_can_8192b;
41 int calc_checksum;
42 uint32_t cmd51_max_buffer;
43 int checksum_vector;
46 enum lpc2000_status_codes
48 LPC2000_CMD_SUCCESS = 0,
49 LPC2000_INVALID_COMMAND = 1,
50 LPC2000_SRC_ADDR_ERROR = 2,
51 LPC2000_DST_ADDR_ERROR = 3,
52 LPC2000_SRC_ADDR_NOT_MAPPED = 4,
53 LPC2000_DST_ADDR_NOT_MAPPED = 5,
54 LPC2000_COUNT_ERROR = 6,
55 LPC2000_INVALID_SECTOR = 7,
56 LPC2000_SECTOR_NOT_BLANK = 8,
57 LPC2000_SECTOR_NOT_PREPARED = 9,
58 LPC2000_COMPARE_ERROR = 10,
59 LPC2000_BUSY = 11,
60 LPC2000_PARAM_ERROR = 12,
61 LPC2000_ADDR_ERROR = 13,
62 LPC2000_ADDR_NOT_MAPPED = 14,
63 LPC2000_CMD_NOT_LOCKED = 15,
64 LPC2000_INVALID_CODE = 16,
65 LPC2000_INVALID_BAUD_RATE = 17,
66 LPC2000_INVALID_STOP_BIT = 18,
67 LPC2000_CRP_ENABLED = 19
71 #endif /* LPC2000_H */