copied the enc28J60.cpp function to hwFunk