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.
假设地址是0x12345678,那么分别按照不同数据位数读取
数据为8位: char val=*((volatile char *)(0x12345678));
数据为16位:short val=*((volatile short *)(0x12345678));
数据为32位:int val=*((volatile int *)(0x12345678));