Tool/software: Code Composer Studio
Hello, I want to read from my EEPROM to my echoPrompt1 char array I am using the code below, but the echoPrompt1 is empty. Please help.
void readEEprom(unsigned short listIndex){
unsigned short j;
startEEprom();
txBuffer[0] = 0x00+listIndex;
txBuffer[1] = 0x00;
i2cTransaction.writeBuf=txBuffer;
i2cTransaction.writeCount=2;
i2cTransaction.readBuf=echoPrompt1;
i2cTransaction.readCount=255;
while(!I2C_transfer(i2c, &i2cTransaction)) //&& counter)
{
usleep(20);
// counter--;
}
I2C_close(i2c);
GPIO_write(CONFIG_GPIO_MEM_EN, 0);
}