Fork for fixes
utility/util.h@3:5b17e4656dd0, 2014-12-20 (annotated)
- Committer:
- hudakz
- Date:
- Sat Dec 20 11:10:40 2014 +0000
- Revision:
- 3:5b17e4656dd0
- Child:
- 4:d774541a34da
02 Name clash with "Ethernet" fixed for LPC1768
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 3:5b17e4656dd0 | 1 | #ifndef UTIL_H |
hudakz | 3:5b17e4656dd0 | 2 | #define UTIL_H |
hudakz | 3:5b17e4656dd0 | 3 | |
hudakz | 3:5b17e4656dd0 | 4 | #define htons(x) ( ((x)<<8) | (((x)>>8)&0xFF) ) |
hudakz | 3:5b17e4656dd0 | 5 | #define ntohs(x) htons(x) |
hudakz | 3:5b17e4656dd0 | 6 | |
hudakz | 3:5b17e4656dd0 | 7 | #define htonl(x) ( ((x)<<24 & 0xFF000000UL) | \ |
hudakz | 3:5b17e4656dd0 | 8 | ((x)<< 8 & 0x00FF0000UL) | \ |
hudakz | 3:5b17e4656dd0 | 9 | ((x)>> 8 & 0x0000FF00UL) | \ |
hudakz | 3:5b17e4656dd0 | 10 | ((x)>>24 & 0x000000FFUL) ) |
hudakz | 3:5b17e4656dd0 | 11 | #define ntohl(x) htonl(x) |
hudakz | 3:5b17e4656dd0 | 12 | |
hudakz | 3:5b17e4656dd0 | 13 | #endif |