Added lw_get_* macros for dword, byte and word.
FossilOrigin-Name: c09e6ec03e77ac3fd835171fb90b1ed78c7bb887f522b9c2f737c663df4c7804
This commit is contained in:
parent
e3a13b24f7
commit
0b5c03e923
@ -143,6 +143,16 @@
|
|||||||
(*((uint32_t*)(dst)) = htonl(dw),4)
|
(*((uint32_t*)(dst)) = htonl(dw),4)
|
||||||
|
|
||||||
|
|
||||||
|
#define lw_get_byte(src)\
|
||||||
|
(*(uint8_t*)(src))
|
||||||
|
|
||||||
|
#define lw_get_word(src) \
|
||||||
|
(ntohs( *(uint16_t*(src))))
|
||||||
|
|
||||||
|
#define lw_get_dword(src) \
|
||||||
|
(ntohl( *(uint32_t*(src))))
|
||||||
|
|
||||||
|
|
||||||
/* the following functions are defined as static inline and not as
|
/* the following functions are defined as static inline and not as
|
||||||
macro to avoid any side effects */
|
macro to avoid any side effects */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user