You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove IsMediaPresent() from the sjsu::Storage interface and have an exception be thrown if the media is not present when Initialize() is called.
Detailed Description
When should IsMediaPresent() be called? Normally it should be called after Initialize(), but without some sort of Enable() or Mount() methods, shouldn't Initialize() handle the duty of setting up peripherals AND mounting the media? At that point, if the media is mounted then checking an additional method is pointless. Initialize could omit the mounting step, then add a Mount() API to storage which would allow a point in time when IsMediaPresent() can be called. But this requires an additional entry on the storage interface's vtable and make the call structure more complicated. Simply making Initialize the only method needed to get storage working and having it throw an exception if it fails seems like the right approach.
The only concern is FAT FS and how there will need to be some work around for checking if media is present.
The text was updated successfully, but these errors were encountered:
Feature Request
Remove
IsMediaPresent()
from thesjsu::Storage
interface and have an exception be thrown if the media is not present whenInitialize()
is called.Detailed Description
When should
IsMediaPresent()
be called? Normally it should be called afterInitialize()
, but without some sort ofEnable()
orMount()
methods, shouldn'tInitialize()
handle the duty of setting up peripherals AND mounting the media? At that point, if the media is mounted then checking an additional method is pointless. Initialize could omit the mounting step, then add a Mount() API to storage which would allow a point in time whenIsMediaPresent()
can be called. But this requires an additional entry on the storage interface's vtable and make the call structure more complicated. Simply making Initialize the only method needed to get storage working and having it throw an exception if it fails seems like the right approach.The only concern is FAT FS and how there will need to be some work around for checking if media is present.
The text was updated successfully, but these errors were encountered: