ARMmbed / mbed-os-example-filesystem

The Mbed OS file system example
https://mbed.com
Apache License 2.0
16 stars 33 forks source link

Add constructors for multiple common block device types including QSPIF #77

Closed maclobdell closed 5 years ago

maclobdell commented 5 years ago

Can we get block device constructors for multiple devices in this example? I had to make these changes while testing this example with a Quad SPI Flash. It worked! I thought it would be nice to just have the constructors for all the common block device types.

I did a full test with DISCO_L475VG_IOT01A.

Compiled successfully for K64F (SD), and USI_WM_BN_BM_22 (SPIF)

dannybenor commented 5 years ago

@davidsaada @yossi2le please review this. What will happen if more than a single component will be enabled in the same target? What will happen if SPIF is not enabled?

davidsaada commented 5 years ago

please review this. What will happen if more than a single component will be enabled in the same target? What will happen if SPIF is not enabled?

Indeed problematic. I think this example should be modified to use BlockDevice's get_default_instance, which practically does the same. See here for more details.

adbridge commented 5 years ago

@dannybenor @davidsaada Can we get a fix in for this asap please ?

davidsaada commented 5 years ago

@adbridge Will handle it on Sunday.

adbridge commented 5 years ago

@davidsaada Don't forget any fixes need to go to the 5.11.-oob branch

davidsaada commented 5 years ago

@maclobdell Please close this PR. Created #78 using the appropriate (and instantiated block device for the board).