uint32_t ChangeEndianness(uint32_t u32Value) { uint32_t u32Result = 0; u32Result |= (u32Value & 0x000000FF) << 24; u32Result |= (u32Value & 0x0000FF00) << 8; u32Result |= (u32Value & 0x00FF0000) >> 8; u32Result |= (u32Value & 0xFF000000) >> 24; return u32Result; }
大端模式与小端模式转换函数?
最新推荐文章于 2024-06-21 07:44:41 发布