2011/10/12 Thomas Martitz <ku...@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.