arduino-audio-tools
Toggle main menu visibility
Main Page
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
f
g
i
m
p
r
s
t
u
v
w
Functions
Variables
Typedefs
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
i
l
m
n
p
r
s
t
u
v
w
x
y
Enumerations
Related Symbols
Files
File List
File Members
All
Functions
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Friends
Modules
Pages
Loading...
Searching...
No Matches
src
AudioTools
CoreAudio
AudioBasic
Net.h
1
#pragma once
2
3
4
#ifndef htons
5
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
6
# define htonl(x) (((x) << 24 & 0xFF000000UL) | ((x) << 8 & 0x00FF0000UL) | ((x) >> 8 & 0x0000FF00UL) | ((x) >> 24 & 0x000000FFUL))
7
# define htons(x) (((uint16_t)(x)&0xff00) >> 8) | (((uint16_t)(x)&0X00FF) << 8)
8
# define ntohl(x) htonl(x)
9
# define ntohs(x) htons(x)
10
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
11
# define htonl(x) x
12
# define htons(x) x
13
# define ntohl(x) x
14
# define ntohs(x) x
15
#else
16
#error Could not determine byte order
17
#endif
18
#endif
19
21
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
22
# define htonll(x) ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
23
# define ntohll(x) ((1==ntohl(1)) ? (x) : ((uint64_t)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
24
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
25
# define htonll(x) x
26
# define ntohll(x) x
27
#endif
Generated by
1.9.8