mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-17 05:19:05 +03:00
14 lines
263 B
C
14 lines
263 B
C
/* endianness helpers for lwip port */
|
|
|
|
/* FIXME: i'm sure there is something in lwip we can use */
|
|
|
|
#include <stdint.h>
|
|
|
|
/* we're on little endian, ntohs & co swap */
|
|
static inline uint16_t ntohs(uint16_t x)
|
|
{
|
|
return (x << 8) | (x >> 8);
|
|
}
|
|
|
|
#define htons ntohs
|