mbed support for LPC4088 Display Module
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos mbed-src
Fork of DMSupport by
FileSystems/USBMSD_RAMFS.cpp@0:6b68dac0d986, 2014-11-21 (annotated)
- Committer:
- embeddedartists
- Date:
- Fri Nov 21 11:42:51 2014 +0000
- Revision:
- 0:6b68dac0d986
- Child:
- 9:a33326afd686
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:6b68dac0d986 | 1 | #include "USBMSD_RAMFS.h" |
embeddedartists | 0:6b68dac0d986 | 2 | |
embeddedartists | 0:6b68dac0d986 | 3 | USBMSD_RAMFS::USBMSD_RAMFS(RAMFileSystem* ramfs, uint16_t vendor_id, uint16_t product_id, uint16_t product_release) : |
embeddedartists | 0:6b68dac0d986 | 4 | USBMSD(vendor_id, product_id, product_release) |
embeddedartists | 0:6b68dac0d986 | 5 | { |
embeddedartists | 0:6b68dac0d986 | 6 | this->ramfs = ramfs; |
embeddedartists | 0:6b68dac0d986 | 7 | } |
embeddedartists | 0:6b68dac0d986 | 8 | |
embeddedartists | 0:6b68dac0d986 | 9 | int USBMSD_RAMFS::disk_read(uint8_t * data, uint64_t block, uint8_t count) |
embeddedartists | 0:6b68dac0d986 | 10 | { |
embeddedartists | 0:6b68dac0d986 | 11 | return ramfs->disk_read(data, block, count); |
embeddedartists | 0:6b68dac0d986 | 12 | } |
embeddedartists | 0:6b68dac0d986 | 13 | |
embeddedartists | 0:6b68dac0d986 | 14 | int USBMSD_RAMFS::disk_write(const uint8_t * data, uint64_t block, uint8_t count) |
embeddedartists | 0:6b68dac0d986 | 15 | { |
embeddedartists | 0:6b68dac0d986 | 16 | return ramfs->disk_write(data, block, count); |
embeddedartists | 0:6b68dac0d986 | 17 | } |
embeddedartists | 0:6b68dac0d986 | 18 | |
embeddedartists | 0:6b68dac0d986 | 19 | int USBMSD_RAMFS::disk_initialize() { |
embeddedartists | 0:6b68dac0d986 | 20 | return ramfs->disk_initialize(); |
embeddedartists | 0:6b68dac0d986 | 21 | } |
embeddedartists | 0:6b68dac0d986 | 22 | |
embeddedartists | 0:6b68dac0d986 | 23 | uint64_t USBMSD_RAMFS::disk_sectors() { |
embeddedartists | 0:6b68dac0d986 | 24 | return ramfs->disk_sectors(); |
embeddedartists | 0:6b68dac0d986 | 25 | } |
embeddedartists | 0:6b68dac0d986 | 26 | |
embeddedartists | 0:6b68dac0d986 | 27 | uint64_t USBMSD_RAMFS::disk_size() { |
embeddedartists | 0:6b68dac0d986 | 28 | return ramfs->disk_size(); |
embeddedartists | 0:6b68dac0d986 | 29 | } |
embeddedartists | 0:6b68dac0d986 | 30 | |
embeddedartists | 0:6b68dac0d986 | 31 | int USBMSD_RAMFS::disk_status() { |
embeddedartists | 0:6b68dac0d986 | 32 | return ramfs->disk_status(); |
embeddedartists | 0:6b68dac0d986 | 33 | } |