不明白这几个函数是用来干嘛的,主函数里面也没涉及到它们,难道想用__eeporm关键字就得把它们加上吗?
当我把__eeprom_wait_for_last_operation这个函数名改成wait_for_last_operation马上就报错,怎么IAR对它好像当成关键字一样的认识,求各位帮忙看一下,怎样来理解呢?
#include "stm8s_flash.h"
#pragma language=extended
int __eeprom_wait_for_last_operation(void)
{
FLASH_Status_TypeDef status = FLASH_WaitForLastOperation(FLASH_MEMTYPE_DATA);
return !!(status & ( FLASH_STATUS_SUCCESSFUL_OPERATION
| FLASH_STATUS_END_HIGH_VOLTAGE));
}
void __eeprom_program_byte(unsigned char __near * dst, unsigned char v)
{
FLASH_ProgramByte((u32)dst, (u8)v);
}
void __eeprom_program_long(unsigned char __near * dst, unsigned long v)
{
FLASH_ProgramWord((u32)dst, (u32)v);
}
__no_init int __eeprom gMem;
int main(void)
{
FLASH_Unlock(FLASH_MEMTYPE_DATA);
gMem = 0; /* struct copy */
FLASH_Lock(FLASH_MEMTYPE_DATA);
}
|