void eeprom_init() { PIO_Configure(pins_eeprom, PIO_LISTSIZE(pins_eeprom)); PMC->PMC_PCER0 = 1 << ID_TWI0; TWI_ConfigureMaster(TWI0, TWCK, BOARD_MCK); TWID_Initialize(&twid, TWI0); eeprom_readBytes(0x100-6, eui48, sizeof(eui48)); //TWID_Read(&twid, 0x50, 0x100-6, 0x01, eui48, sizeof(eui48), 0); eui64[0] = eui48[0]; eui64[1] = eui48[1]; eui64[2] = eui48[2]; eui64[3] = 0xFF; eui64[4] = 0xFE; eui64[5] = eui48[3]; eui64[6] = eui48[4]; eui64[7] = eui48[5]; return; }
void genericreadBytes(uint16_t addr, int nBytes, void *buffer) { eeprom_readBytes(addr, nBytes, buffer); }