- 论坛徽章:
- 1
|
//convert_endian_32 (foo) 大小端转换
//m_GPGS_object.get_status_for_JT808() 返回 0
//非临界资源
#define DWORD unsigned int
————————————————————————————————————
//code start
printf("\n 0x%02x line =[%d] \n",CConfigUtility_object.m_position_status,__LINE__);//line 574
DWORD foo = m_GPGS_object.get_status_for_JT808()|CConfigUtility_object.m_position_status;
printf("\n 0x%02x line =[%d] \n",foo,__LINE__);
stu_inf->status = convert_endian_32 (foo);
printf("\n 0x%02x line =[%d] \n",stu_inf->status,__LINE__);
stu_inf->status = foo;
printf("\n 0x%02x line =[%d] \n",stu_inf->status,__LINE__);
stu_inf->status = convert_endian_32(stu_inf->status);
printf("\n 0x%02x line =[%d] \n",stu_inf->status,__LINE__);
//code end
————————————————————————————————————
//实际打印数据
0x400 line =[574]
0x400 line =[576]
0x04 line =[578]
0x4000000 line =[580]
0x40000 line =[582]
————————————————————————————————————
我认为 576打印的数据 和 580应该一样
578 的数据应该为 0x40000
//理想中的打印
0x400 line =[574]
0x400 line =[576]
0x40000 line =[578]
0x400 line =[580]
0x40000 line =[582]
诸位同行 请问问题处在哪里
|
|