Lines Matching refs:val
31 #define BCMSWAP16(val) \
32 ((uint16)((((uint16)(val) & (uint16)0x00ffU) << 8) | \
33 (((uint16)(val) & (uint16)0xff00U) >> 8)))
36 #define BCMSWAP32(val) \
37 ((uint32)((((uint32)(val) & (uint32)0x000000ffU) << 24) | \
38 (((uint32)(val) & (uint32)0x0000ff00U) << 8) | \
39 (((uint32)(val) & (uint32)0x00ff0000U) >> 8) | \
40 (((uint32)(val) & (uint32)0xff000000U) >> 24)))
43 #define BCMSWAP32BY16(val) \
44 ((uint32)((((uint32)(val) & (uint32)0x0000ffffU) << 16) | \
45 (((uint32)(val) & (uint32)0xffff0000U) >> 16)))
97 #define bcmswap16(val) ({ \
98 uint16 _val = (val); \
102 #define bcmswap32(val) ({ \
103 uint32 _val = (val); \
107 #define bcmswap32by16(val) ({ \
108 uint32 _val = (val); \
121 #define htol16_ua_store(val, bytes) ({ \
122 uint16 _val = (val); \
128 #define htol32_ua_store(val, bytes) ({ \
129 uint32 _val = (val); \
137 #define hton16_ua_store(val, bytes) ({ \
138 uint16 _val = (val); \
144 #define hton32_ua_store(val, bytes) ({ \
145 uint32 _val = (val); \
177 bcmswap16(uint16 val)
179 return BCMSWAP16(val);
183 bcmswap32(uint32 val)
185 return BCMSWAP32(val);
189 bcmswap32by16(uint32 val)
191 return BCMSWAP32BY16(val);
210 htol16_ua_store(uint16 val, uint8 *bytes)
212 bytes[0] = val & 0xff;
213 bytes[1] = val >> 8;
218 htol32_ua_store(uint32 val, uint8 *bytes)
220 bytes[0] = val & 0xff;
221 bytes[1] = (val >> 8) & 0xff;
222 bytes[2] = (val >> 16) & 0xff;
223 bytes[3] = val >> 24;
228 hton16_ua_store(uint16 val, uint8 *bytes)
230 bytes[0] = val >> 8;
231 bytes[1] = val & 0xff;
236 hton32_ua_store(uint32 val, uint8 *bytes)
238 bytes[0] = val >> 24;
239 bytes[1] = (val >> 16) & 0xff;
240 bytes[2] = (val >> 8) & 0xff;
241 bytes[3] = val & 0xff;