dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: SH7034 and File API

SH7034 and File API

From: Alan Korr <>
Date: Thu, 28 Mar 2002 09:39:06 (GMT)

>> Just a request :
>> I prefer to be able to choose a byte or a word access thru
>> on-chip addresses depending what I need to do. So avoid to
>> defines this address with a fixed size access.
>I am a little curious, since I am new to this processor. When it is
>interesting to select between byte and word accesses on a single on-chip

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
- HI : half interger => 16-bit word
- QI : quarter (?) integer => 8-bit word

So when I want access one port as a byte, just do :

  value = QI(port_address);
  QI(port_address) = value;

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,
>> anyone?) think in terms of upper level api yet? I mean, not
>> the specific details but in concepts?
>> Too early. I prefer to do things in incremental order :
>I agree. First things first.

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.

This mail was sent using - Send Your Mail Now!
Received on 2002-03-28

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy