From 1e9b7f6a65fc986fd3e38bf2bc72e2ce52f340d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Fri, 24 May 2019 12:40:30 +0200 Subject: [PATCH] USBHostMSD: Implement BlockDevice get_type() This makes it possible to create instances of USBHostMSD class. --- features/unsupported/USBHost/USBHostMSD/USBHostMSD.cpp | 5 +++++ features/unsupported/USBHost/USBHostMSD/USBHostMSD.h | 1 + 2 files changed, 6 insertions(+) diff --git a/features/unsupported/USBHost/USBHostMSD/USBHostMSD.cpp b/features/unsupported/USBHost/USBHostMSD/USBHostMSD.cpp index 6279f0f528..9e1c3c8c96 100644 --- a/features/unsupported/USBHost/USBHostMSD/USBHostMSD.cpp +++ b/features/unsupported/USBHost/USBHostMSD/USBHostMSD.cpp @@ -403,4 +403,9 @@ bd_size_t USBHostMSD::size() const USB_DBG("FILESYSTEM: size "); return (disk_init ? (bd_size_t)blockSize : 0); } + +const char *USBHostMSD::get_type() const +{ + return "USBMSD"; +} #endif diff --git a/features/unsupported/USBHost/USBHostMSD/USBHostMSD.h b/features/unsupported/USBHost/USBHostMSD/USBHostMSD.h index 07233d010a..7ce52fa981 100644 --- a/features/unsupported/USBHost/USBHostMSD/USBHostMSD.h +++ b/features/unsupported/USBHost/USBHostMSD/USBHostMSD.h @@ -63,6 +63,7 @@ public: virtual bd_size_t get_program_size() const; virtual bd_size_t get_erase_size() const; virtual bd_size_t size() const; + virtual const char *get_type() const;