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

Rockbox mail archive

Subject: Re: development questions

Re: development questions

From: Linus Nielsen Feltzing <>
Date: Mon, 17 Jan 2005 08:53:14 +0100

Ray Lambert wrote:
> I'm not sure what you mean by "off-screen" icons.

I had a hard time finding a good name for it. :-)

> Are you saying there are two different display areas on these
> devices; one that uses fonts and one which doesn't, or something like
> that?

It's a two-line text display surrounded by fixed icons. The font can't
be changed, but the LCD can redefine up to 8 custom characters. We use
that to simulate a latin-8 character set.

> In any case, I guess it sounds like there's nothing I can do. :(


> Since my post, I've found a new way to do from mpeg.c which was
> pretty easy and seems to be more accurate. I put the check in
> playback_tick() (since that's where id3->elapsed gets updated). This
> seems to work very well but I'm not sure if it's a good design
> decision to put my code there.

That's where I would put it.

> The main question is whether it's safe. playback_tick() is called
> from a timer interrupt. Everything in my code seems to be safe to
> touch in an interrupt (atomic and read-only); the only question is
> whether the calls back to mpeg.c are safe. They all end-up doing a
> queue_post(), which is safe so long as the queuing operation is safe.

Yup. The queue_post() function is interrupt safe, and is intended to be
called from interrupts.

> There's also a question of using too much CPU in the interrupt. But
> there's really only a few integer comparisons taking place and the
> queue_post() call. So I think that's okay. I haven't noticed any
> problems in my testing so far.

I think it sounds perfectly OK.

Bring on the patch! :-)

Received on 2005-01-17

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