-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaning up #134
Cleaning up #134
Conversation
Cleaned some code, fixed obscure DNS ports
@mindstormsking thanks for contributing! Have you tested that the examples work with these changes in place? I'm always nervous about messing with the register setup, as innocuous as those changes may seem... |
@vicatcu I have tested the new code with the getDHCPandDNS sample and it works flawlessly. The MACON2 register I have removed does not exist. The datasheet of the ENC28J60 never mentions it or any of its bits, but states its address as Reserved. According to the datasheet "All reserved registers may be read, but their contents must not be changed.", so a write operation should not be performed. EPMM0 and EPMCS are used for pattern matching, but it is off by default and never switched on, so they are useless. The bits EIE_INTIE and EIE_PKTIE are pin-interrupt settings, while the pin-interrupt is not used according to the EtherCard wiki. Last but not least, the bits MACON1_TXPAUS and MACON1_RXPAUS are used only in full-duplex mode, while according to all other settings, half-duplex mode is used. -Edit, I'm sorry, it was not my intention to close it. |
@mindstormsking have you reviewed the errata documents on the ENC28J60 as well... there's some insidious stuff in there :) |
@vicatcu Yes I have, and you are right that there is some insidious stuff there, but I haven't found anything related to my changes. |
If you rebase, travis will compile the examples and we'll have more confidence they didn't break. |
Right now, Travis CI is broken (and looks like it has been for quite a while), so I've disabled it. Also, this change now has conflicts with master, so can't be merged as is. I'll be very happy to merge it in, once you fix this PR. |
Closing this as it is quite out of date - other things have changed since this PR was created.
|
Change suggested by @mindstormsking in #134: EPMM0 and EPMCS are used for pattern matching, but it is off by default and never switched on, so they are useless.
Change suggested by @mindstormsking in #134: The bits EIE_INTIE and EIE_PKTIE are pin-interrupt settings, while the pin-interrupt is not by EtherCard.
Change suggested by @mindstormsking in #134: The bits MACON1_TXPAUS and MACON1_RXPAUS are used only in full-duplex mode, while according to all other settings, half-duplex mode is used.
Three more pull requests:
I think that covers everything in this PR, thanks @mindstormsking |
Change suggested by @mindstormsking in #134: The bits MACON1_TXPAUS and MACON1_RXPAUS are used only in full-duplex mode, while according to all other settings, half-duplex mode is used.
I cleaned up the code (removed non-existing registers, settings which aren't used, double declarations), fixed a description of a mac address, and fixed obscure DHCP ports. They were swapped everywhere (See RFC1531 4.1)