Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libraries/lwIP_enc28j60/src/utility/enc28j60.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,14 @@ boolean ENC28J60::begin(const uint8_t* address)

/*---------------------------------------------------------------------------*/

void ENC28J60::end()
{
// stop reception. ECON1 is mirrored into every bank, so no bank switch is needed
clearregbitfield(ECON1, ECON1_RXEN);
}

/*---------------------------------------------------------------------------*/

uint16_t ENC28J60::sendFrame(const uint8_t* data, uint16_t datalen)
{
uint16_t dataend;
Expand Down
6 changes: 6 additions & 0 deletions libraries/lwIP_enc28j60/src/utility/enc28j60.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ class ENC28J60
*/
boolean begin(const uint8_t* address);

/**
Shut down the Ethernet controller
Stops the reception of Ethernet frames until the next ::begin()
*/
void end();

/**
Send an Ethernet frame
@param data a pointer to the data to send
Expand Down