Good question. I stumbled about this, too, when I looked at the code how I could apply your patch. Some months had past since I wrote it :-)
The code writes to a serial EEPROM, so the 16 bits are sent using only a clock and a single data bit. The EEPROM emulation then takes the single bits and puts them together. The function gets a byte which contains clock, data and two other significant bits, and 4 bits which are always 0. When called with a word, only one byte is needed. Maybe it is the wrong one - if you work with different endianess. I'l have a look at the other problems next weekend. Stefan Ben Taylor wrote: > I have a question. in eepro100_write2, I see a word (16-bits) being > passed in, but only the low part of the word gets written to the eeprom. > Since it's a word write, shouldn't it be writing both bytes to the eeprom? > > Ben