fluorescenceBackup_t fluorescenceDataBack __attribute__((at(0xc1000000)));
uint8_t printf(char *rdFileName,char * s)
{
uint32_t flags;
fluorescenceBackup_t *pi;
pi= &fluorescenceDataBack;
flags = (uint32_t)p_fluorescenceDataBack;
printf("addr = 0x%p \r\n",p_fluorescenceDataBack);//s 为指针,直接打印(addr = 0xc1000000)
printf("addr = 0x%08x \r\n",flags); //s 为指针,强制转换地址打印(addr = 0xc1000000)
printf("addr = 0x%08x \r\n",(uint32_t)pi); //s 为指针,强制转换地址打印(addr = 0xc1000000)
}
/*
上面结果均为:addr = 0xc01000000;
*/
4.4 指针地址打印
于 2023-04-14 13:44:46 首次发布