IOT_GRZYBKI / cantcoap

Dependents:   WIFI_BOARD

Committer:
tkanas
Date:
Thu Jan 24 22:38:10 2019 +0000
Revision:
3:43bbf986ce1e
debugging;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tkanas 3:43bbf986ce1e 1
tkanas 3:43bbf986ce1e 2 uint16_t htons (uint16_t x) {
tkanas 3:43bbf986ce1e 3 #if BYTE_ORDER == BIG_ENDIAN
tkanas 3:43bbf986ce1e 4 return x;
tkanas 3:43bbf986ce1e 5 #elif BYTE_ORDER == LITTLE_ENDIAN
tkanas 3:43bbf986ce1e 6 return __bswap_16 (x);
tkanas 3:43bbf986ce1e 7 #else
tkanas 3:43bbf986ce1e 8 # error "What kind of system is this?"
tkanas 3:43bbf986ce1e 9 #endif
tkanas 3:43bbf986ce1e 10 }
tkanas 3:43bbf986ce1e 11
tkanas 3:43bbf986ce1e 12 uint16_t ntohs (uint16_t x) {
tkanas 3:43bbf986ce1e 13 #if BYTE_ORDER == BIG_ENDIAN
tkanas 3:43bbf986ce1e 14 return x;
tkanas 3:43bbf986ce1e 15 #elif BYTE_ORDER == LITTLE_ENDIAN
tkanas 3:43bbf986ce1e 16 return __bswap_16 (x);
tkanas 3:43bbf986ce1e 17 #else
tkanas 3:43bbf986ce1e 18 # error "What kind of system is this?"
tkanas 3:43bbf986ce1e 19 #endif
tkanas 3:43bbf986ce1e 20 }