3 Copyright (C) Dean Camera, 2009.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
33 * Board specific Dataflash commands header for the AT45DB321C as mounted on the STK525.
35 * \note This file should not be included directly. It is automatically included as needed by the dataflash driver
36 * dispatch header located in LUFA/Drivers/Board/Dataflash.h.
39 /** \ingroup Group_Dataflash_STK525
40 * @defgroup Group_Dataflash_STK525_AT45DB321C AT45DB321C
45 #ifndef __DATAFLASH_CMDS_H__
46 #define __DATAFLASH_CMDS_H__
48 /* Public Interface - May be used in end-application: */
50 #define DF_STATUS_READY (1 << 7)
51 #define DF_STATUS_COMPMISMATCH (1 << 6)
52 #define DF_STATUS_SECTORPROTECTION_ON (1 << 1)
54 #define DF_MANUFACTURER_ATMEL 0x1F
56 #define DF_CMD_GETSTATUS 0xD7
58 #define DF_CMD_MAINMEMTOBUFF1 0x53
59 #define DF_CMD_MAINMEMTOBUFF2 0x55
60 #define DF_CMD_MAINMEMTOBUFF1COMP 0x60
61 #define DF_CMD_MAINMEMTOBUFF2COMP 0x61
62 #define DF_CMD_AUTOREWRITEBUFF1 0x58
63 #define DF_CMD_AUTOREWRITEBUFF2 0x59
65 #define DF_CMD_MAINMEMPAGEREAD 0xD2
66 #define DF_CMD_CONTARRAYREAD_LF 0xE8
67 #define DF_CMD_BUFF1READ_LF 0xD4
68 #define DF_CMD_BUFF2READ_LF 0xD6
70 #define DF_CMD_BUFF1WRITE 0x84
71 #define DF_CMD_BUFF2WRITE 0x87
72 #define DF_CMD_BUFF1TOMAINMEMWITHERASE 0x83
73 #define DF_CMD_BUFF2TOMAINMEMWITHERASE 0x86
74 #define DF_CMD_BUFF1TOMAINMEM 0x88
75 #define DF_CMD_BUFF2TOMAINMEM 0x89
76 #define DF_CMD_MAINMEMPAGETHROUGHBUFF1 0x82
77 #define DF_CMD_MAINMEMPAGETHROUGHBUFF2 0x85
79 #define DF_CMD_PAGEERASE 0x81
80 #define DF_CMD_BLOCKERASE 0x50
82 #define DF_CMD_SECTORPROTECTIONOFF ((char[]){0x3D, 0x2A, 0x7F, 0xCF})
83 #define DF_CMD_SECTORPROTECTIONOFF_BYTE1 0x3D
84 #define DF_CMD_SECTORPROTECTIONOFF_BYTE2 0x2A
85 #define DF_CMD_SECTORPROTECTIONOFF_BYTE3 0x7F
86 #define DF_CMD_SECTORPROTECTIONOFF_BYTE4 0xCF
88 #define DF_CMD_READMANUFACTURERDEVICEINFO 0x9F