请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
部件号:TM4C123GH6PM 请,如何使用内置EEPROM保存四位数密码?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Arinze您好!
首先,您需要初始化EEPROM:
SysCtlPeripheralEnable(SYSCTL_PERIPH_EEPROM0); EEPROMInit();
然后,您可以使用 EEPROMProgram对EEPROM进行编程-指明应在您的可用数据的2kB内的位置,以及您正在写入的字节数。
EEPROMProgram(&WrBuffer, 0x00, NumBytesToWrite);
要重新读取数据,您可以将EEPROMRead与这些参数配合使用。
EEPROMRead(&RdBuffer, 0x00, NumBytesToRead);
此致,
Ralph Jacobi