This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Small #include question
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: "Cusson, Pascal" <pascal dot cusson at analog dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Tue, 22 Oct 2002 17:23:57 +0200
- Subject: Re: [ECOS] Small #include question
- References: <8FDC0F9BE1F91D44BE964AA54AAA67B69C03AD@wilmexm3.ad.analog.com>
On Tue, Oct 22, 2002 at 11:15:19AM -0400, Cusson, Pascal wrote:
> Hi everyone,
> I am starting to write my Ethernet driver. From the ecos
> documentation, it says the only file I need to include is network.h.
For network application code, ie using sockets etc, you should only
need network.h. For device drivers you need many more header files. eg
the i82559 driver includes
#include <pkgconf/system.h>
#ifdef CYGPKG_IO_ETH_DRIVERS
#include <pkgconf/io_eth_drivers.h>
#endif
#include <pkgconf/devs_eth_intel_i82559.h>
#include <cyg/infra/cyg_type.h>
#include <cyg/infra/cyg_ass.h>
#include <cyg/hal/hal_arch.h>
#include <cyg/hal/hal_intr.h>
#include <cyg/infra/diag.h>
#include <cyg/hal/hal_if.h>
#include <cyg/hal/drv_api.h>
#include <cyg/io/eth/netdev.h>
#include <cyg/io/eth/eth_drv.h>
> However When I include the file, I get I bunch of errors ( .h files
> not found). In my ecos build, I include NET and OPENBSD. Do I need
> to include a different file or do I need to include more packages
> ???
You also need net_drivers. This is the basic ethernet driver
framework.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss