#include <sys/stdint.h>
#include <sys/endian.h>
Go to the source code of this file.
|
#define | UGETB(w) ((w)[0]) |
|
#define | UGETW(w) |
|
#define | UGETDW(w) |
|
#define | UGETQW(w) |
|
#define | USETB(w, v) |
|
#define | USETW(w, v) |
|
#define | USETDW(w, v) |
|
#define | USETQW(w, v) |
|
#define | USETW2(w, b1, b0) |
|
#define | USETW4(w, b3, b2, b1, b0) |
|
#define | USETW8(w, b7, b6, b5, b4, b3, b2, b1, b0) |
|
◆ UGETB
#define UGETB |
( |
|
w | ) |
((w)[0]) |
◆ UGETDW
Value: ((w)[0] | \
(((uint16_t)((w)[1])) << 8) | \
(((uint32_t)((w)[2])) << 16) | \
(((uint32_t)((w)[3])) << 24))
Definition at line 57 of file usb_endian.h.
◆ UGETQW
Value: ((w)[0] | \
(((uint16_t)((w)[1])) << 8) | \
(((uint32_t)((w)[2])) << 16) | \
(((uint32_t)((w)[3])) << 24) | \
(((uint64_t)((w)[4])) << 32) | \
(((uint64_t)((w)[5])) << 40) | \
(((uint64_t)((w)[6])) << 48) | \
(((uint64_t)((w)[7])) << 56))
Definition at line 63 of file usb_endian.h.
◆ UGETW
Value: ((w)[0] | \
(((uint16_t)((w)[1])) << 8))
Definition at line 53 of file usb_endian.h.
◆ USETB
Value: do { \
(w)[0] = (uint8_t)(v); \
} while (0)
Definition at line 73 of file usb_endian.h.
◆ USETDW
Value: do { \
(w)[0] = (uint8_t)(v); \
(w)[1] = (uint8_t)((v) >> 8); \
(w)[2] = (uint8_t)((v) >> 16); \
(w)[3] = (uint8_t)((v) >> 24); \
} while (0)
Definition at line 82 of file usb_endian.h.
◆ USETQW
Value: do { \
(w)[0] = (uint8_t)(v); \
(w)[1] = (uint8_t)((v) >> 8); \
(w)[2] = (uint8_t)((v) >> 16); \
(w)[3] = (uint8_t)((v) >> 24); \
(w)[4] = (uint8_t)((v) >> 32); \
(w)[5] = (uint8_t)((v) >> 40); \
(w)[6] = (uint8_t)((v) >> 48); \
(w)[7] = (uint8_t)((v) >> 56); \
} while (0)
Definition at line 89 of file usb_endian.h.
◆ USETW
Value: do { \
(w)[0] = (uint8_t)(v); \
(w)[1] = (uint8_t)((v) >> 8); \
} while (0)
Definition at line 77 of file usb_endian.h.
◆ USETW2
#define USETW2 |
( |
|
w, |
|
|
|
b1, |
|
|
|
b0 |
|
) |
| |
Value: do { \
(w)[0] = (uint8_t)(b0); \
(w)[1] = (uint8_t)(b1); \
} while (0)
Definition at line 100 of file usb_endian.h.
◆ USETW4
#define USETW4 |
( |
|
w, |
|
|
|
b3, |
|
|
|
b2, |
|
|
|
b1, |
|
|
|
b0 |
|
) |
| |
Value: do { \
(w)[0] = (uint8_t)(b0); \
(w)[1] = (uint8_t)(b1); \
(w)[2] = (uint8_t)(b2); \
(w)[3] = (uint8_t)(b3); \
} while (0)
Definition at line 105 of file usb_endian.h.
◆ USETW8
#define USETW8 |
( |
|
w, |
|
|
|
b7, |
|
|
|
b6, |
|
|
|
b5, |
|
|
|
b4, |
|
|
|
b3, |
|
|
|
b2, |
|
|
|
b1, |
|
|
|
b0 |
|
) |
| |
Value: do { \
(w)[0] = (uint8_t)(b0); \
(w)[1] = (uint8_t)(b1); \
(w)[2] = (uint8_t)(b2); \
(w)[3] = (uint8_t)(b3); \
(w)[4] = (uint8_t)(b4); \
(w)[5] = (uint8_t)(b5); \
(w)[6] = (uint8_t)(b6); \
(w)[7] = (uint8_t)(b7); \
} while (0)
Definition at line 112 of file usb_endian.h.
◆ uByte
◆ uDWord
typedef uint8_t uDWord[4] |
◆ uQWord
typedef uint8_t uQWord[8] |
◆ uWord