flash_at91.h
Go to the documentation of this file.00001 00040 #ifndef FLASH_AT91_H 00041 #define FLASH_AT91_H 00042 00043 #include <cpu/types.h> 00044 00045 #include <kern/kfile.h> 00046 00047 #include <io/arm.h> 00048 00049 00053 typedef uint32_t arm_page_t; 00054 typedef uint32_t arm_page_addr_t; 00055 00059 typedef struct FlashAt91 00060 { 00064 KFile fd; 00065 00069 bool page_dirty; 00070 00074 arm_page_t curr_page; 00075 00080 uint8_t page_buf[FLASH_PAGE_SIZE_BYTES]; 00081 00082 00083 } FlashAt91; 00084 00088 #define KFT_FLASHAT91 MAKE_ID('F', 'A', '9', '1') 00089 00093 INLINE FlashAt91 * FLASHAT91_CAST(KFile *fd) 00094 { 00095 ASSERT(fd->_type == KFT_FLASHAT91); 00096 return (FlashAt91 *)fd; 00097 } 00098 00099 00100 void flash_at91_init(FlashAt91 *fd); 00101 00102 #endif
