/****************************************************************************/
/* */
/* 数据校验 */
/* */
/****************************************************************************/
int VerifyData(void)
{
unsigned int index;
for(index = 4; index < 260; index++)
{
if(vrf_data[index] != rx_data[index])
{
UARTPuts("\r\n", -1);
UARTPuts("VerifyData: Comparing the data written to and read", -1);
UARTPuts(" from Flash.\r\nThe two data blocks are unequal.", -1);
UARTPuts(" Mismatch found at index ", -1);
UARTPutNum((int)index - 3);
UARTPuts("\r\n", -1);
UARTPuts("Verify Failed.\r\n", -1);
return 0;
}
}
if (index == 260)
{
UARTPuts("\r\nThe data in the Flash and the one written ", -1);
UARTPuts("to it are equal.\r\n", -1);
UARTPuts("Verify successfully.\r\n", -1);
return 1;
}