comparison flash.h @ 25:a9cc07caa801

Add stream read/write commands.
author Daniel O'Connor <darius@dons.net.au>
date Sat, 17 Nov 2012 12:18:24 +1030
parents bd8e2cf04034
children 5c9d2e3d6591
comparison
equal deleted inserted replaced
24:1e2fa7396f98 25:a9cc07caa801
5 void flashwritectl(int enable); 5 void flashwritectl(int enable);
6 void flash4kerase(uint32_t addr); 6 void flash4kerase(uint32_t addr);
7 uint8_t flashread(uint32_t addr); 7 uint8_t flashread(uint32_t addr);
8 void flashenablewrite(void); 8 void flashenablewrite(void);
9 void flashwrite(uint32_t addr, uint8_t data); 9 void flashwrite(uint32_t addr, uint8_t data);
10 void flashwait(void);
11
12 /* Streaming read/write */
13 void flashstartread(uint32_t addr);
14 uint8_t flashreadbyte(void);
15 void flashstartwrite(uint32_t addr, uint16_t data);
16 void flashwriteword(uint16_t data);
17 void flashstopread(void);
18 void flashstopwrite(void);
10 19
11 #define FL_BUSY (1<<0) 20 #define FL_BUSY (1<<0)
12 #define FL_WEL (1<<1) 21 #define FL_WEL (1<<1)
13 #define FL_BP0 (1<<2) 22 #define FL_BP0 (1<<2)
14 #define FL_BP1 (1<<3) 23 #define FL_BP1 (1<<3)