[En-Nut-Discussion] Power manager interface
Thiago A. Corrêa
thiago.correa at gmail.com
Mon Aug 15 22:21:07 CEST 2011
Hi,
I've started working with porting Nut/OS to support UC3L in
addition to UC3A/B devices. I'm using it for a small board that
controls relays, so no networking. Still, something came up with the
port, the power manager.
In the UC3A and B family, the Power manager controls the PLL and
crystal selection. In the UC3L however, there is a different
peripheral that does that. Unfortunally, Atmel didn't make their code
in a way to abstract those differences and let a single code run on
top of any of those, making programmers rely on ugly #ifdefs. I'm
starting to cut down on the pm.c module, keeping only what I need to
setup the PLL on UC3A/B and will try to get the same interface to work
with UC3L, so I don't have to polute nutinit with those implementation
details.
I suspect Ulrich might have already had similar problems with the
cortex branch so I might be reinventing some private functions that
could perhaps be public in a standard API.
Do you think this should be exported? Or should we keep the
powermanager interface to ourselfs in private implementations in each
arch?
Kind Regards,
Thiago A. Correa
More information about the En-Nut-Discussion
mailing list