mbed OS5
Fork of UIPEthernet by
utility/util.h@9:e55652bed36c, 2017-08-06 (annotated)
- Committer:
- pilotak
- Date:
- Sun Aug 06 16:01:26 2017 +0000
- Revision:
- 9:e55652bed36c
- Parent:
- 8:4acb22344932
mBed OS5
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 3:5b17e4656dd0 | 1 | #ifndef UTIL_H |
hudakz | 8:4acb22344932 | 2 | #define UTIL_H |
hudakz | 3:5b17e4656dd0 | 3 | |
hudakz | 8:4acb22344932 | 4 | #define htons(x) (u16_t) ((((u16_t) (x)) << 8) | (((u16_t) (x)) >> 8)) |
hudakz | 8:4acb22344932 | 5 | //#define ntohs(x) htons(x) |
hudakz | 8:4acb22344932 | 6 | #define htonl(x) (((x) << 24 & 0xFF000000UL) | ((x) << 8 & 0x00FF0000UL) | ((x) >> 8 & 0x0000FF00UL) | ((x) >> 24 & 0x000000FFUL)) |
hudakz | 8:4acb22344932 | 7 | #define ntohl(x) htonl(x) |
hudakz | 3:5b17e4656dd0 | 8 | #endif |