comparison flash.h @ 70:aaf0603d7f88

Add routine to CRC a block of flash. Use it to verify a flash block write.
author Daniel O'Connor <darius@dons.net.au>
date Sun, 14 Apr 2013 22:53:50 +0930
parents 03592ca4d37e
children
comparison
equal deleted inserted replaced
69:cf9eb08b8b23 70:aaf0603d7f88
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); 10 void flashwait(void);
11 int flashreadblock(uint32_t addr, uint32_t len, void *_data); 11 int flashreadblock(uint32_t addr, uint32_t len, void *_data);
12 void flashwriteblock(uint32_t addr, uint32_t len, void *_data); 12 int flashwriteblock(uint32_t addr, uint32_t len, void *_data);
13 uint32_t flashcrcblock(uint32_t addr, uint32_t len);
13 14
14 /* Streaming read/write */ 15 /* Streaming read/write */
15 void flashstartread(uint32_t addr); 16 void flashstartread(uint32_t addr);
16 uint8_t flashreadbyte(void); 17 uint8_t flashreadbyte(void);
17 void flashstartwrite(uint32_t addr, uint16_t data); 18 void flashstartwrite(uint32_t addr, uint16_t data);