void save()
{
#if 1
SPI_FLASH_BufferRead(&cal_flag, 0, 1);
if( cal_flag == 0x55 )
{
SPI_FLASH_BufferRead((void*)cal_p, 1, sizeof(cal_p));
SPI_FLASH_CS_HIGH();
}
else
{
/* 等待触摸屏校正完毕 */
while(Touch_Calibrate() !=0);
}
#elif 0
/* 等待触摸屏校正完毕 */
while(Touch_Calibrate() !=0);
#endif
} |