[En-Nut-Discussion] Read/Write Routine (Gediminas Simanskis)
Berns J. Buenaobra
bbuenaobra at nip.upd.edu.ph
Sat Jan 31 04:47:49 CET 2004
Hello to Gediminas Simanskis:
I got this suggestion from Harald to try out this code below:
int writeEEPROM(u_char sla,u_int addr,void *txdata,u_short len) {
u_char data[128];
data[0] = (u_char)(addr>>8);
data[1] = (u_char) addr;
memcpy(&data[2],txdata,len);
TwMasterTransact(sla, data,len+2, 0, 0, 0);
_delay_loop_2(10000);
return 0 ;
For a 'C01 tied up to PORTD of the Ethernut 1.3F board, how do you use
it? Where does _delay_loop2(10000) come from some header?
Thanks,
Berns Buenaobra
More information about the En-Nut-Discussion
mailing list