Skip to content

Commit

Permalink
Initialize the PHLCON register to stretch pulses, make LED A link (#285)
Browse files Browse the repository at this point in the history
status and LED B RX/TX activity.  Before this change LED B only
registered RX activity.
  • Loading branch information
ifreislich authored and njh committed Jul 28, 2018
1 parent 6c0c5b3 commit 38d925c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions enc28j60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ byte ENC28J60::initialize (uint16_t size, const byte* macaddr, byte csPin) {
writeReg(ETXST, TXSTART_INIT);
writeReg(ETXND, TXSTOP_INIT);

// Stretch pulses for LED, LED_A=Link, LED_B=activity
writePhy(PHLCON, 0x476);

writeRegByte(ERXFCON, ERXFCON_UCEN|ERXFCON_CRCEN|ERXFCON_PMEN|ERXFCON_BCEN);
writeReg(EPMM0, 0x303f);
writeReg(EPMCS, 0xf7f9);
Expand Down

0 comments on commit 38d925c

Please sign in to comment.