source:
rtos_arduino/trunk/arduino_lib/libraries/Ethernet2/src/util.h@
286
Last change on this file since 286 was 136, checked in by , 9 years ago | |
---|---|
File size: 330 bytes |
Rev | Line | |
---|---|---|
[136] | 1 | #ifndef UTIL_H |
2 | #define UTIL_H | |
3 | ||
4 | #define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) ) | |
5 | #define ntohs(x) htons(x) | |
6 | ||
7 | #define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ | |
8 | ((x)<< 8 & 0x00FF0000UL) | \ | |
9 | ((x)>> 8 & 0x0000FF00UL) | \ | |
10 | ((x)>>24 & 0x000000FFUL) ) | |
11 | #define ntohl(x) htonl(x) | |
12 | ||
13 | #endif |
Note:
See TracBrowser
for help on using the repository browser.