@ersmith said:
... so at least in theory someone could hook up multiple SD cards to a single P2.
I've done it. I've bulk copied files from one card to another as one of my test programs ... Or at least I tried, it was a while back and I don't remember the outcome to be honest.
EDIT2: Err, maybe this is all a rubbish idea? I see the struct __using("filesys/block/sdmm.cc") *SDMM; is located in _sdmm_open() function. That's where things are different.
Ada/Eric,
Just thinking about the recent relocation of _sdmm_open() and co. for init of the inbuilt driver. In my driver, I've been happily placing that functionality all directly into the driver source file. It feels tidy to me ... I'm thinking the same could be done here as example for any future third-party driver endeavours. Then all drivers internally get the same API layout.
Only different becomes the whereabouts a driver gets loaded. With third-party it is explicitly a struct __using() in the user code as opposed to buried in the headers.
EDIT: On achieving identical API, splitting off _vfs_open_sdcardx() from _sdmm_open() would be in order. While _sdmm_open() would go into the driver, the legacy functions of _vfs_open_sdcard() and _vfs_open_sdcardx() could go back where they came from. And sdmm_vfs.c would be no more.
Comments
I've done it. I've bulk copied files from one card to another as one of my test programs ... Or at least I tried, it was a while back and I don't remember the outcome to be honest.
EDIT2: Err, maybe this is all a rubbish idea? I see the
struct __using("filesys/block/sdmm.cc") *SDMM;is located in _sdmm_open() function. That's where things are different.Ada/Eric,
Just thinking about the recent relocation of _sdmm_open() and co. for init of the inbuilt driver. In my driver, I've been happily placing that functionality all directly into the driver source file. It feels tidy to me ... I'm thinking the same could be done here as example for any future third-party driver endeavours. Then all drivers internally get the same API layout.
Only different becomes the whereabouts a driver gets loaded. With third-party it is explicitly a
struct __using()in the user code as opposed to buried in the headers.EDIT: On achieving identical API, splitting off _vfs_open_sdcardx() from _sdmm_open() would be in order. While _sdmm_open() would go into the driver, the legacy functions of _vfs_open_sdcard() and _vfs_open_sdcardx() could go back where they came from. And sdmm_vfs.c would be no more.