This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NETDEVTAB_ENTRY()????


On 2005-12-29, Andrew Lunn <andrew@lunn.ch> wrote:

>> 3. If I want to create my own NETDEVTAB table, then what changes I have to 
>> make to my code what I have mailed previous???
>
> Well you would not call it netdev for a start. Call it something else
> so that it does not cause problems with the eCos netdev table. You can
> however use the netdev table as an example of how it should be
> done. There are other examples for using HAL tables, eg commands for
> redboot.

As an aside, I've found the "table" scheme used for those
things in eCos tobe a _very_ useful thing to have in my
toolbox.  I've used it for all sorts of things in both eCos and
non-eCos projects.

In a general sense, it allows "modules" to be more loosely
coupled than C allows.

For example, you can have an embedded system made up of modules
that are _completely_ "static" in the C sense (they export no
global symbols).  You can choose at link time which modules you
want in the program without having to change any source code or
even re-compile anything.

I'm sure the eCos internals gurus are all aware of the power of
the "HAL table", but I expect it has escaped the notice of most
eCos HAL application programs.  It's worth noticing. ;)

-- 
Grant Edwards
grante@visi.com


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]