500KB USB mass storage
Dependencies: mbed EEPROM USBDevice
USBMSD_STEP1.h
00001 #ifndef USBMSD_STEP1_H 00002 #define USBMSD_STEP1_H 00003 00004 00005 #include "mbed.h" 00006 #define USBMSD_STEP1_SECTORS 1004 00007 #define USBMSD_STEP1_SECTOR_SIZE 512 00008 #define USBMSD_STEP1_DISK_SIZE USBMSD_STEP1_SECTOR_SIZE*USBMSD_STEP1_SECTORS 00009 #include <stdlib.h> 00010 #include "USBMSD.h" 00011 #include "RawNAND.h" 00012 #include "bbt_eeprom.h" 00013 00014 class USBMSD_STEP1: public USBMSD 00015 { public: 00016 USBMSD_STEP1(PinName ceb, PinName cle, 00017 PinName ale, PinName web, 00018 PinName reb, PinName wpb, 00019 PinName rbb, 00020 PinName io1, PinName io2, 00021 PinName io3, PinName io4, 00022 PinName io5, PinName io6, 00023 PinName io7, PinName io8, 00024 PinName ledRd,PinName ledWr,PinName swInit); 00025 00026 virtual int disk_read(uint8_t* data, uint64_t block, uint8_t count); 00027 virtual int disk_write(const uint8_t* data, uint64_t block, uint8_t count); 00028 virtual int disk_initialize(); 00029 virtual uint64_t disk_sectors(); 00030 virtual uint64_t disk_size(); 00031 virtual int disk_status(); 00032 00033 DigitalOut * m_ledRead; 00034 DigitalOut * m_ledWrite; 00035 DigitalIn * m_swInit; 00036 // DigitalIn * m_isp; 00037 00038 private: 00039 RawNAND * m_rawNand; 00040 bbt_eeprom * m_bbt; 00041 // uint8_t m_buffer[512*8]; 00042 }; 00043 00044 #endif
Generated on Thu Jul 14 2022 10:50:52 by 1.7.2