1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/sys/endian.dosc Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,245 @@
1.4 +/** @file ../include/sys/endian.h
1.5 +@internalComponent
1.6 +*/
1.7 +
1.8 +/** @fn be16dec(const void *pp)
1.9 +
1.10 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.11 +
1.12 +@publishedAll
1.13 +@released
1.14 +*/
1.15 +
1.16 +
1.17 +/** @fn be32dec(const void *pp)
1.18 +
1.19 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.20 +
1.21 +@publishedAll
1.22 +@released
1.23 +*/
1.24 +
1.25 +/** @fn be64dec(const void *pp)
1.26 +
1.27 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.28 +
1.29 +@publishedAll
1.30 +@released
1.31 +*/
1.32 +
1.33 +
1.34 +/** @fn le16dec(const void *pp)
1.35 +
1.36 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.37 +
1.38 +@publishedAll
1.39 +@released
1.40 +*/
1.41 +
1.42 +
1.43 +/** @fn le32dec(const void *pp)
1.44 +
1.45 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.46 +
1.47 +@publishedAll
1.48 +@released
1.49 +*/
1.50 +
1.51 +
1.52 +/** @fn le64dec(const void *pp)
1.53 +
1.54 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.55 +
1.56 +@publishedAll
1.57 +@released
1.58 +*/
1.59 +
1.60 +
1.61 +/** @fn be16enc(void *pp, uint16_t u)
1.62 +
1.63 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.64 +
1.65 +@publishedAll
1.66 +@released
1.67 +*/
1.68 +
1.69 +/** @fn be32enc(void *pp, uint32_t u)
1.70 +
1.71 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.72 +
1.73 +@publishedAll
1.74 +@released
1.75 +*/
1.76 +
1.77 +
1.78 +/** @fn be64enc(void *pp, uint64_t u)
1.79 +
1.80 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.81 +
1.82 +@publishedAll
1.83 +@released
1.84 +*/
1.85 +
1.86 +/** @fn le16enc(void *pp, uint16_t u)
1.87 +
1.88 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.89 +
1.90 +@publishedAll
1.91 +@released
1.92 +*/
1.93 +
1.94 +/** @fn le32enc(void *pp, uint32_t u)
1.95 +
1.96 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.97 +
1.98 +@publishedAll
1.99 +@released
1.100 +*/
1.101 +
1.102 +/** @fn le64enc(void *pp, uint64_t u)
1.103 +
1.104 +Alignment-agnostic encode or decode bytestream to or from little or big endian.
1.105 +
1.106 +@publishedAll
1.107 +@released
1.108 +*/
1.109 +
1.110 +
1.111 +/** @def bswap16(x)
1.112 +
1.113 +General byte order swapping functions.
1.114 +
1.115 +@publishedAll
1.116 +@externallyDefinedApi
1.117 +*/
1.118 +
1.119 +
1.120 +/** @def bswap32(x)
1.121 +
1.122 +General byte order swapping functions.
1.123 +
1.124 +@publishedAll
1.125 +@externallyDefinedApi
1.126 +*/
1.127 +
1.128 +
1.129 +/**@def bswap64(x)
1.130 +
1.131 +General byte order swapping functions.
1.132 +
1.133 +@publishedAll
1.134 +@externallyDefinedApi
1.135 +*/
1.136 +
1.137 +/** @def htobe16(x)
1.138 +
1.139 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.140 +The return value will be the same as the argument on big endian systems.
1.141 +
1.142 +@publishedAll
1.143 +@externallyDefinedApi
1.144 +*/
1.145 +
1.146 +
1.147 +/** @def htobe32(x)
1.148 +
1.149 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.150 +The return value will be the same as the argument on big endian systems.
1.151 +
1.152 +@publishedAll
1.153 +@externallyDefinedApi
1.154 +*/
1.155 +
1.156 +/** @def htobe64(x)
1.157 +
1.158 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.159 +The return value will be the same as the argument on big endian systems.
1.160 +
1.161 +@publishedAll
1.162 +@externallyDefinedApi
1.163 +*/
1.164 +
1.165 +
1.166 +/** @def htole16(x)
1.167 +
1.168 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.169 +The return value will be the same as the argument on big endian systems.
1.170 +
1.171 +@publishedAll
1.172 +@externallyDefinedApi
1.173 +*/
1.174 +
1.175 +
1.176 +/** @def htole32(x)
1.177 +
1.178 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.179 +The return value will be the same as the argument on big endian systems.
1.180 +
1.181 +@publishedAll
1.182 +@externallyDefinedApi
1.183 +*/
1.184 +
1.185 +/** @def htole64(x)
1.186 +
1.187 +Macro returning a integer in the system's native byte order converted to big endian byte order.
1.188 +The return value will be the same as the argument on big endian systems.
1.189 +
1.190 +@publishedAll
1.191 +@externallyDefinedApi
1.192 +*/
1.193 +
1.194 +/** @def be16toh(x)
1.195 +
1.196 +Macro returning a big endian byte ordered integer converted to the system's native byte order.
1.197 +The return value will be the same as the argument on big endian systems.
1.198 +
1.199 +@publishedAll
1.200 +@externallyDefinedApi
1.201 +*/
1.202 +
1.203 +/** @def be32toh(x)
1.204 +
1.205 +Macro returning a big endian byte ordered integer converted to the system's native byte order.
1.206 +The return value will be the same as the argument on big endian systems.
1.207 +
1.208 +@publishedAll
1.209 +@externallyDefinedApi
1.210 +*/
1.211 +
1.212 +/** @def be64toh(x)
1.213 +
1.214 +Macro returning a big endian byte ordered integer converted to the system's native byte order.
1.215 +The return value will be the same as the argument on big endian systems.
1.216 +
1.217 +@publishedAll
1.218 +@externallyDefinedApi
1.219 +*/
1.220 +
1.221 +/** @def le16toh(x)
1.222 +
1.223 +Macro returning a little endian byte ordered integer converted to the system's native byte order.
1.224 +The return value will be the same as the argument on little endian systems.
1.225 +
1.226 +@publishedAll
1.227 +@externallyDefinedApi
1.228 +*/
1.229 +
1.230 +/** @def le32toh(x)
1.231 +
1.232 +Macro returning a little endian byte ordered integer converted to the system's native byte order.
1.233 +The return value will be the same as the argument on little endian systems.
1.234 +
1.235 +@publishedAll
1.236 +@externallyDefinedApi
1.237 +*/
1.238 +
1.239 +/** @def le64toh(x)
1.240 +
1.241 +Macro returning a little endian byte ordered integer converted to the system's native byte order.
1.242 +The return value will be the same as the argument on little endian systems.
1.243 +
1.244 +@publishedAll
1.245 +@externallyDefinedApi
1.246 +*/
1.247 +
1.248 +