diff 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
line wrap: on
line diff
--- a/flash.h	Sun Apr 14 22:52:21 2013 +0930
+++ b/flash.h	Sun Apr 14 22:53:50 2013 +0930
@@ -9,7 +9,8 @@
 void		flashwrite(uint32_t addr, uint8_t data);
 void		flashwait(void);
 int		flashreadblock(uint32_t addr, uint32_t len, void *_data);
-void		flashwriteblock(uint32_t addr, uint32_t len, void *_data);
+int		flashwriteblock(uint32_t addr, uint32_t len, void *_data);
+uint32_t	flashcrcblock(uint32_t addr, uint32_t len);
 
 /* Streaming read/write */
 void		flashstartread(uint32_t addr);