[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] driver for enc28j60
From: |
chrysn |
Subject: |
[lwip-users] driver for enc28j60 |
Date: |
Tue, 22 Jan 2013 13:16:37 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
hello lwip-users,
i've written a driver for the ENC28J60 ethernet module, and would like
to share it for good use and review.
it is working well both with 1.4.1 and 1.5, but has much potential for
optimization; the code can be found at [1] and includes a minimal
working example for the EFM32 platform.
there are several questions i'd like to have answered for enhancing
this:
* is there a generally recommended file and naming structure for device
drivers? i stuck with the mchdrv from the wiki. what is general best
practice with respect to distributing drivers?
* how are mac addresses usually assigned? the ENC28J60 has none burnt
into it, so it has to be set from outside. should this be passed in
via netif->state? in general, how is ->state to be used? as i need
state for accessing the hardware (planned: also to determine which
hardware to use), should that come from outside or managed internally?
* netif_linkoutput_fn is err_t, but sending takes time. how is this
supposed to return a transmission error without blocking?
* the network interface drivers in the -contrib module are all old.
is there still the intention of keeping device drivers in there?
* the enc28j60 has a transmit buffer, where in theory we could have
packages linger around until they're not needed any more for sure. are
there facilities in lwip that help utilizing such a buffer? (i'm aware
that this would include several very tricky corner cases; coordination
for that usage would go very far through the stack.)
* would you consider having a rough look over the lwip code to spot bad
misunderstandings on my part? it's not much code, most of it is
encapsulated in the hardware driver anyway.
best regards
chrysn
[1] https://gitorious.org/enc28j60driver/enc28j60driver
--
To use raw power is to make yourself infinitely vulnerable to greater powers.
-- Bene Gesserit axiom
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] driver for enc28j60,
chrysn <=