/* Given the bank number this function selects one of the four banks.  */
void enc28j60_lwip_select_bank(uint32_t spiHandle, uint8_t bankNumber)
/* Given the bank number this function selects one of the four banks.  */
void enc28j60_lwip_select_bank(uint32_t spiHandle, uint8_t bankNumber)
{
    NATIVE_PROFILE_HAL_DRIVERS_ETHERNET();
    uint8_t byteData = 0;
    bankNumber &= 0x3;
    enc28j60_lwip_read_spi(spiHandle, ENC28J60_SPI_READ_CONTROL_REGISTER_OPCODE, ENC28J60_ECON1, &byteData, 1, 0);
    byteData &= 0xFC;
    byteData |= bankNumber;
    enc28j60_lwip_write_spi(spiHandle, ENC28J60_SPI_WRITE_CONTROL_REGISTER_OPCODE, ENC28J60_ECON1, byteData);
}