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.

关于thermometer例程里面的温度数据传输问题



TI的代码

// temperature
uint32 temperature;

//flags

uint8 flags = thermometerFlags[thermometerFlagsIdx];

// flags 1 byte long

*p++ = flags;

if(flags & THERMOMETER_FLAGS_FARENHEIT)

{

temperature = (thermometerCelcius *9/5) +320;

}

else

{

temperature = thermometerCelcius;

}

temperature = 0xFF000000 | temperature;

//osal_buffer_uint32

osal_buffer_uint32( p, temperature );

其中的

  1. temperature = 0xFF000000 | temperature;

一直搞不到是什么意思,为什么或一个这个数呢,而且经过实验发现,要想发送一个带一位小数的数据,必须这样做,

求大神指点,这是什么意思呢。。