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: i2c unification

Re: i2c unification

From: Amaury Pouly <amaury.pouly_at_gmail.com>
Date: Fri, 10 Dec 2010 09:33:48 +0100

> Anyway I am opened for sugesstions. If you could write down simple
> example how you think this should be done I'll be happy to look at.
>
> I think what he means is that since the i2c busses are always the same for
a given target, the runtime registration stuff adds some overhead and
perhaps we could build the callback table at compile time (using some
ifdefs). Something like perhaps:

static const struct i2c_struct *i2c_if[MAX_I2C_INTERFACES] =

{
#ifdef MY_I2C_FOR_MY_TARGET
  [MY_I2C_IFACE_NR] = ...
#endif
....
};
Received on 2010-12-10


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