全球旧事资料 分类
按照你给出的读、写的字节函数,写出校验数据的读写函数如下:wr_uchara1uchara2uchara3uchara4需要写入四个字节SectorErase0x2000byte_write0x2000a1写入数据
SectorErase0x2001byte_write0x2001a2写入数据
SectorErase0x2002byte_write0x2002a3写入数据
SectorErase0x2003byte_write0x2003a4写入数据
SectorErase0x2004byte_write0x2004a1写入数据
SectorErase0x2005byte_write0x2005a2写入数据
SectorErase0x2006byte_write0x2006a3写入数据
SectorErase0x2007byte_write0x2007a4写入数据实际上写入了8个字节
bitrd_读出8字节a0byte_read0x2000从EEPROM读数据a1byte_read0x2001从EEPROM读数据a2byte_read0x2002从EEPROM读数据a3byte_read0x2003从EEPROM读数据a4byte_read0x2004从EEPROM读数据a5byte_read0x2005从EEPROM读数据
fa6byte_read0x2006从EEPROM读数据a7byte_read0x2007从EEPROM读数据判断正确性ifa0a4a1a5a2a6a3a7retur
1retur
0
fr
好听全球资料 返回顶部