[En-Nut-Discussion] Nut/OS Initialization
Harald Kipp
harald.kipp at egnite.de
Wed Sep 17 19:16:38 CEST 2008
Thiago A. Corrêa wrote:
> On Wed, Sep 17, 2008 at 1:54 PM, Nathan Moore <nategoose at gmail.com> wrote:
>> check, and you could probably get away with
>> aliasing one default callback function as multiple call backs so you don't
>> end up a bunch of code that not only does
>> nothing, but does the exact same nothing -- just have one copy of it with as
>> many names as needed.
>
> Exactly.
>
> Then user_callback does the normal NutRegisterDevice as it is. No
> structs and such :)
OK, that one is clear. Currently Nut/OS often checks if a function
pointer is NULL, which has the same result, but produces more code.
But initially Ole suggested a structure containing function pointers,
quite similar to the NUTDEVICE structure we have now. My question still
is, how should Nut/OS know about these structure, so it can call its
initialization functions? Nathan explained the contents of the
structure, but not its link to the Nut/OS initialization. Correct me if
I'm wrong.
Harald
More information about the En-Nut-Discussion
mailing list