写一个C宏,实现大小端之间的转换 #define sw16(x) \ ((short)( \ (((short)(x) & (short)0x00ffU) << 8 ) | \ (((short)(x) & (short)0xff00U) >> 8 ) )) 假设x=0xaabb (short)(x) & (short)0x00ffU) 与将16位数高8位置0 成了0x00bb 然后<<8 向左移8位后 低8位变成了...
写一个C宏,实现大小端之间的转换 写⼀个C宏,实现⼤⼩端之间的转换 #define sw16(x) \ ((short)( \ (((short)(x) & (short)0x00ffU) << 8 ) | \ (((short)(x) & (short)0xff00U) >> 8 ) ))假设x=0xaabb (short)(x) & (short)0x00ffU) 与将16位数⾼8位置0 成了0x...