Rockbox mail archiveSubject: SH7034 and File API
From: Alan Korr (post_at_pegasmail.com)
>> Just a request :
When I use 'clear_bit' or 'set-bit', I use a byte access because it is the only way to use atomic READ-MODIFY-WRITE operation on SH1.
When I want to setup values for ports A and B, I prefer to use a 32-bit word access to setup both instead of two 16-bit words accesses for each (more compact and clever code).
I chose to use gcc convention :
- SI : single integer => 32-bit word
So when I want access one port as a byte, just do :
value = QI(port_address);
Quite a simple and clear form, isn't it ?
To be flexible enough is not a crime :).
>>>Yes. Did anyone of you filesystem fiddlers (Linus, Alan,
Daniel, don't wait for us to have a file API if you need one.
I first want to explore how to implement a clever way to handle file and folder with a maximal efficiency and a minimal waste space, before proposing a file API. So be free to have yours for the moment.
Page was last modified "Jan 10 2012" The Rockbox Crew