File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
blockdevice/tests/TESTS/blockdevice/general_block_device Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -752,13 +752,14 @@ void test_write_deinit_init()
752
752
753
753
void test_get_type_functionality ()
754
754
{
755
- utest_printf (" \n Test get blockdevice type..\n " );
755
+ utest_printf (" Test get blockdevice type..\n " );
756
756
757
757
block_device = BlockDevice::get_default_instance ();
758
758
TEST_SKIP_UNLESS_MESSAGE (block_device != NULL , " no block device found." );
759
759
760
760
const char *bd_type = block_device->get_type ();
761
761
TEST_ASSERT_NOT_EQUAL (0 , bd_type);
762
+ utest_printf (" block device found: %s\n " , bd_type);
762
763
763
764
#if COMPONENT_QSPIF
764
765
TEST_ASSERT_EQUAL (0 , strcmp (bd_type, " QSPIF" ));
@@ -770,7 +771,7 @@ void test_get_type_functionality()
770
771
TEST_ASSERT_EQUAL (0 , strcmp (bd_type, " DATAFLASH" ));
771
772
#elif COMPONENT_SD
772
773
TEST_ASSERT_EQUAL (0 , strcmp (bd_type, " SD" ));
773
- #elif COMPONET_FLASHIAP
774
+ #elif COMPONENT_FLASHIAP
774
775
TEST_ASSERT_EQUAL (0 , strcmp (bd_type, " FLASHIAP" ));
775
776
#endif
776
777
}
Original file line number Diff line number Diff line change 28
28
#include " storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.h"
29
29
#endif
30
30
31
+ #if COMPONENT_OSPIF
32
+ #include " storage/blockdevice/COMPONENT_OSPIF/OSPIFBlockDevice.h"
33
+ #endif
34
+
31
35
#if COMPONENT_DATAFLASH
32
36
#include " storage/blockdevice/COMPONENT_DATAFLASH/DataFlashBlockDevice.h"
33
37
#endif
@@ -75,6 +79,12 @@ MBED_WEAK BlockDevice *BlockDevice::get_default_instance()
75
79
76
80
return &default_bd;
77
81
82
+ #elif COMPONENT_OSPIF
83
+
84
+ static OSPIFBlockDevice default_bd;
85
+
86
+ return &default_bd;
87
+
78
88
#elif COMPONENT_DATAFLASH
79
89
80
90
static DataFlashBlockDevice default_bd;
@@ -140,7 +150,7 @@ MBED_WEAK BlockDevice *BlockDevice::get_default_instance()
140
150
141
151
MBED_WEAK FileSystem *FileSystem::get_default_instance ()
142
152
{
143
- #if COMPONENT_SPIF || COMPONENT_QSPIF || COMPONENT_DATAFLASH
153
+ #if COMPONENT_SPIF || COMPONENT_QSPIF || COMPONENT_OSPIF || COMPONENT_DATAFLASH
144
154
145
155
static LittleFileSystem flash (" flash" , BlockDevice::get_default_instance ());
146
156
flash.set_as_default ();
You can’t perform that action at this time.
0 commit comments