source: rtos_arduino/trunk/arduino_lib/libraries/Ethernet2/src/utility/util.h@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 364 bytes
Line 
1#ifndef UTIL_H
2#define UTIL_H
3
4#define htons(x) ( ((x)<< 8 & 0xFF00) | \
5 ((x)>> 8 & 0x00FF) )
6#define ntohs(x) htons(x)
7
8#define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \
9 ((x)<< 8 & 0x00FF0000UL) | \
10 ((x)>> 8 & 0x0000FF00UL) | \
11 ((x)>>24 & 0x000000FFUL) )
12#define ntohl(x) htonl(x)
13
14#endif
Note: See TracBrowser for help on using the repository browser.