Maybe I'm being dumb but I find the doc rather opaque and I have two queries.
The doc seems to imply that a uos.AbstractBlockDev class exists. As far as I can see it does not, and the concept is merely a template for writing block devices. You can write a base class following the design of this template to produce devices which can be mounted as filesystems.
Secondly, in addition to the basic, aligned readblocks and writeblocks methods, the doc describes unaligned methods with an offset arg, but gives no reason why you might want to do this. In my efforts I've written only an ioctl and the aligned variants; the outcome appears to work correctly. Should I also provide unaligned methods?
Any clarification would be gratefully received.
uos docs: the abstract block device SOLVED
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
uos docs: the abstract block device SOLVED
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
-
- Posts: 169
- Joined: Fri Aug 19, 2016 11:55 am
Re: uos docs: the abstract block device
I haven’t checked, but the wording of this sentence seems to imply that littlefs requires the extended readblocks/writeblocks interface:
http://docs.micropython.org/en/latest/reference/filesystem.html#custom-block-devices wrote:As it supports the extended interface, it can be used with littlefs
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: uos docs: the abstract block device
Thank you, that does make sense and your conclusion is supported by the code examples.
I hadn't spotted that page in the docs
I hadn't spotted that page in the docs
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: uos docs: the abstract block device SOLVED
Thanks, I agree this could do with a better explanation -- sent https://github.com/micropython/micropython/pull/5421
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: uos docs: the abstract block device SOLVED
That's great, but I've added some more suggestions. The doc is rather ambiguous as it stands.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.