打印

PIC C30编译器,内部函数调用出错。

[复制链接]
2397|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
lhzw2001|  楼主 | 2012-2-7 08:34 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
int __attribute__ ((space(eedata))) eeData = 0x1234; // Variable located in EEPROM

unsigned int offset;


// Set up NVMCON to erase one word of data EEPROM

NVMCON = 0x4058;

// Set up a pointer to the EEPROM location to be erased

TBLPAG = __builtin_tblpage(&eeData); // Initialize EE Data page pointer


offset = __builtin_tbloffset(&eeData); // Initizlize lower word of address

__builtin_tblwtl(offset, 0); // Write EEPROM data to write latch

asm volatile ("disi #5"); // Disable Interrupts For 5 Instructions

__builtin_write_NVM(); // Issue Unlock Sequence & Start Write Cycle



error: Argument to __builtin_tblpage() is not the address

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

77

主题

337

帖子

0

粉丝