Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Trimming the lcd api

Re: Trimming the lcd api

From: Marcin Bukat <marcin.bukat_at_gmail.com>
Date: Wed, 12 Oct 2011 12:20:04 +0200

2011/10/12 Thomas Martitz <kugel_at_rockbox.org>:
> Am 11.10.2011 21:22, schrieb Björn Stenberg:
>>
>> I would like to condense all of our puts variants into one single
>> function:
>>
>>  void lcd_puts(int x, int y, int xcrop, int style,
>>                bool scrolled, const char* fmt, ...)
>>
>
> I agree this number of wrappers is excessive, and a smaller API (and pixel
> based with scrolling, finally) would be great. But perhaps keep 1 or 2 of
> the most simple wrappers (if they're also the most common one) as calling
> functions with a large number of parameters does have a binsize impact (and
> there's a large number of callers). Not to mention the inconvinience for the
> most simple cases.
>
> Perhaps
>
> void lcd_puts(int x, int y, const char* text);
> void lcd_putsf(int x, int y, const char* fmt, ...);
> void lcd_putsf_ex(int x, int y, int xcrop, int style, bool scrolled, const
> char* fmt, ...);
>
> ?
>
> Best regards.
>

It is worh noting that on arm-eabi r0-r3 are used to pass arguments to
called function. Above 4 args things are passed through the stack.
Received on 2011-10-12


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa