Summary

The goal of this chapter is not to create a complete network stack but rather to implement just enough of the Internet protocols so that the embedded system can talk to the rest of the network. The Ethernet driver (similar to our serial port driver) is written in polled mode, and only one packet is processed at a time. Because this system does not even enable interrupts, I do not have to worry about queuing up multiple packets. When polling determines that a packet has been received, the software processes the packet, sends a response if appropriate, then waits for another packet. This approach keeps things simple. In keeping with the baby steps philosophy, this approach provides a working first step for the driver. What you learn with this pass can be used on the next pass (if needed) that becomes interrupt driven. No time is lost, even if interrupts are eventually needed. This philosophy is applicable to any driver being written.



Embedded Systems Firmware Demystified
Embedded Systems Firmware Demystified (With CD-ROM)
ISBN: 1578200997
EAN: 2147483647
Year: 2002
Pages: 118
Authors: Ed Sutter

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net