本帖最后由 inurl 于 2013-1-6 09:44 编辑
int i = 0 ;
__packed int *addr1 = (__packed int *)((u8 *)&i + 1) ;
int *addr2 = (int *)((u8 *)&i + 1);
int *addr3 = (int *)((u8 *)&i + 2);
int *addr4 = (int *)((u8 *)&i + 3);
*addr1 = 19;
*addr2 = 19;
*addr3 = 19;
*addr4 = 19;
struct __STT{
u8 a;
__packed int b;
u8 c;
}ST;
ST.b = 19;
STM32或者ARM7或者ARM9
|