// Poll EEPROM Status to make sure Write Enable Latch has been set
do
{
// Send Read Status Register Commeand
SPI_enableCS(hSPIMemInfo->hSPIInfo);
SPI_xferOneChar(hSPIMemInfo->hSPIInfo,SPI_MEM_CMD_RDSR);
statusReg = SPI_xferOneChar(hSPIMemInfo->hSPIInfo,0x00);
SPI_disableCS(hSPIMemInfo->hSPIInfo);
}
while((statusReg & 0x3u) != 0x2);
}