#define libusb_cpu_to_le16 | ( | x | ) |
Value:
({ \
union { \
uint8_t b8[2]; \
uint16_t b16; \
} _tmp; \
uint16_t _tmp2 = (uint16_t)(x); \
_tmp.b8[1] = _tmp2 >> 8; \
_tmp.b8[0] = _tmp2 & 0xff; \
_tmp.b16; \
})
On little endian systems, this function does nothing. On big endian systems, the bytes are swapped.
x | the host-endian value to convert |
#define libusb_le16_to_cpu libusb_cpu_to_le16 |
Convert a 16-bit value from little-endian to host-endian format.
On little endian systems, this function does nothing. On big endian systems, the bytes are swapped.
x | the little-endian value to convert |
Standard requests, as defined in table 9-3 of the USB2 specifications.
enum libusb_request_type |
Request type bits of the bmRequestType field in control transfers.
Recipient bits of the bmRequestType field in control transfers.
Values 4 through 31 are reserved.
enum libusb_error |
Error codes.
Most libusb functions return 0 on success or one of these codes on failure.