diff flash.h @ 8:58d76cf522ff

Split out code into separate files.
author Daniel O'Connor <darius@dons.net.au>
date Sat, 04 Feb 2012 13:29:31 +1030
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flash.h	Sat Feb 04 13:29:31 2012 +1030
@@ -0,0 +1,29 @@
+uint16_t	flashreadid(void);
+uint8_t		flashreadstatus(void);
+void		flashwritestatus(uint8_t status);
+void		flashwritectl(int enable);
+
+#define FL_BP0		(1<<2)
+#define FL_BP1		(1<<3)
+#define FL_BP2		(1<<4)
+#define FL_BP3		(1<<5)
+#define FL_BPL		(1<<7)
+
+#define FL_READ		0x03
+#define FL_HSREAD	0x0b
+#define FL_32KERASE	0x52
+#define FL_64KERASE	0xd8
+#define FL_CHIPERASE	0x60
+#define FL_BYTEPROG	0x02
+#define FL_AAIWP	0xad
+#define FL_RDSR		0x05
+#define FL_EWSR		0x50
+#define FL_WRSR		0x01
+#define FL_WREN		0x06
+#define FL_WRDI		0x04
+#define FL_RDID		0x90
+#define FL_JEDECID	0x9f
+#define FL_EBSY		0x70
+#define FL_DBSY		0x80
+
+