A board support package for the LPC4088 Display Module.
Dependencies: DM_HttpServer DM_USBHost
Dependents: lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more
Fork of DMSupport by
FileSystems/USBMSD_RAMFS.cpp@42:bbfe299d4a0c, 2019-11-04 (annotated)
- Committer:
- embeddedartists
- Date:
- Mon Nov 04 14:32:50 2019 +0000
- Revision:
- 42:bbfe299d4a0c
- Parent:
- 41:e06e764ff4fd
More updates related to mbed OS 5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 9:a33326afd686 | 1 | /* |
embeddedartists | 9:a33326afd686 | 2 | * Copyright 2014 Embedded Artists AB |
embeddedartists | 9:a33326afd686 | 3 | * |
embeddedartists | 9:a33326afd686 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
embeddedartists | 9:a33326afd686 | 5 | * you may not use this file except in compliance with the License. |
embeddedartists | 9:a33326afd686 | 6 | * You may obtain a copy of the License at |
embeddedartists | 9:a33326afd686 | 7 | * |
embeddedartists | 9:a33326afd686 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
embeddedartists | 9:a33326afd686 | 9 | * |
embeddedartists | 9:a33326afd686 | 10 | * Unless required by applicable law or agreed to in writing, software |
embeddedartists | 9:a33326afd686 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
embeddedartists | 9:a33326afd686 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
embeddedartists | 9:a33326afd686 | 13 | * See the License for the specific language governing permissions and |
embeddedartists | 9:a33326afd686 | 14 | * limitations under the License. |
embeddedartists | 9:a33326afd686 | 15 | */ |
embeddedartists | 9:a33326afd686 | 16 | |
embeddedartists | 0:6b68dac0d986 | 17 | #include "USBMSD_RAMFS.h" |
embeddedartists | 0:6b68dac0d986 | 18 | |
embeddedartists | 41:e06e764ff4fd | 19 | USBMSD_RAMFS::USBMSD_RAMFS(/*RAMFileSystem* ramfs*/HeapBlockDevice* ramfs, uint16_t vendor_id, uint16_t product_id, uint16_t product_release) : |
embeddedartists | 41:e06e764ff4fd | 20 | USBMSD(ramfs, true, vendor_id, product_id, product_release) |
embeddedartists | 0:6b68dac0d986 | 21 | { |
embeddedartists | 41:e06e764ff4fd | 22 | //this->ramfs = ramfs; |
embeddedartists | 0:6b68dac0d986 | 23 | } |
embeddedartists | 41:e06e764ff4fd | 24 | /* |
embeddedartists | 0:6b68dac0d986 | 25 | int USBMSD_RAMFS::disk_read(uint8_t * data, uint64_t block, uint8_t count) |
embeddedartists | 0:6b68dac0d986 | 26 | { |
embeddedartists | 0:6b68dac0d986 | 27 | return ramfs->disk_read(data, block, count); |
embeddedartists | 0:6b68dac0d986 | 28 | } |
embeddedartists | 0:6b68dac0d986 | 29 | |
embeddedartists | 0:6b68dac0d986 | 30 | int USBMSD_RAMFS::disk_write(const uint8_t * data, uint64_t block, uint8_t count) |
embeddedartists | 0:6b68dac0d986 | 31 | { |
embeddedartists | 0:6b68dac0d986 | 32 | return ramfs->disk_write(data, block, count); |
embeddedartists | 0:6b68dac0d986 | 33 | } |
embeddedartists | 0:6b68dac0d986 | 34 | |
embeddedartists | 0:6b68dac0d986 | 35 | int USBMSD_RAMFS::disk_initialize() { |
embeddedartists | 0:6b68dac0d986 | 36 | return ramfs->disk_initialize(); |
embeddedartists | 0:6b68dac0d986 | 37 | } |
embeddedartists | 0:6b68dac0d986 | 38 | |
embeddedartists | 0:6b68dac0d986 | 39 | uint64_t USBMSD_RAMFS::disk_sectors() { |
embeddedartists | 0:6b68dac0d986 | 40 | return ramfs->disk_sectors(); |
embeddedartists | 0:6b68dac0d986 | 41 | } |
embeddedartists | 0:6b68dac0d986 | 42 | |
embeddedartists | 0:6b68dac0d986 | 43 | uint64_t USBMSD_RAMFS::disk_size() { |
embeddedartists | 0:6b68dac0d986 | 44 | return ramfs->disk_size(); |
embeddedartists | 0:6b68dac0d986 | 45 | } |
embeddedartists | 0:6b68dac0d986 | 46 | |
embeddedartists | 0:6b68dac0d986 | 47 | int USBMSD_RAMFS::disk_status() { |
embeddedartists | 0:6b68dac0d986 | 48 | return ramfs->disk_status(); |
embeddedartists | 0:6b68dac0d986 | 49 | } |
embeddedartists | 41:e06e764ff4fd | 50 | */ |