XC8 文档中 描述EEPROM、FLASH 操作,是什么意思?

2020-02-07 09:36发布

本帖最后由 斗笠渔翁2 于 2014-4-24 11:45 编辑

datashtte 说在外库函数,什么意思?指哪份文档?

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
1条回答
spcm
1楼-- · 2020-02-07 13:57
//EEPROM
#define        ___mkstr1(x)        #x
#define        ___mkstr(x)        ___mkstr1(x)

/* Initialise device EEPROM (if available) with 8 bytes of data at a time eg.
* // store initial values to first 16-bytes of EEPROM address range.
* __EEPROM_DATA(0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07);
* __EEPROM_DATA(0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F);*/
#if _EEPROMSIZE > 0
#define __EEPROM_DATA(a, b, c, d, e, f, g, h)
                         asm(" psect eeprom_data,class=EEDATA");
                         asm(" db " ___mkstr(a) "," ___mkstr(b) "," ___mkstr(c) "," ___mkstr(d) ","
                                      ___mkstr(e) "," ___mkstr(f) "," ___mkstr(g) "," ___mkstr(h))
#else
#define __EEPROM_DATA(a, b, c, d, e, f, g, h)        // Added only for code portability
#endif

一周热门 更多>