enc28j60: Program ETXND after the data packet
Just follow the steps from the data sheet to transmit a packet. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
This commit is contained in:
parent
15d1b177d6
commit
8c6e3e348a
|
@ -535,12 +535,12 @@ enc28j60_send(uint8_t *data, uint16_t datalen)
|
||||||
configuration (the values in MACON3) will be used. */
|
configuration (the values in MACON3) will be used. */
|
||||||
writedatabyte(0x00); /* MACON3 */
|
writedatabyte(0x00); /* MACON3 */
|
||||||
|
|
||||||
|
writedata(data, datalen);
|
||||||
|
|
||||||
/* Write a pointer to the last data byte. */
|
/* Write a pointer to the last data byte. */
|
||||||
writereg(ETXNDL, (TX_BUF_START + datalen + 0) & 0xff);
|
writereg(ETXNDL, (TX_BUF_START + datalen + 0) & 0xff);
|
||||||
writereg(ETXNDH, (TX_BUF_START + datalen + 0) >> 8);
|
writereg(ETXNDH, (TX_BUF_START + datalen + 0) >> 8);
|
||||||
|
|
||||||
writedata(data, datalen);
|
|
||||||
|
|
||||||
/* Clear EIR.TXIF */
|
/* Clear EIR.TXIF */
|
||||||
clearregbitfield(EIR, EIR_TXIF);
|
clearregbitfield(EIR, EIR_TXIF);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue