add tuh_descriptor_get() and tuh_descriptor_device_get()

This commit is contained in:
hathach
2022-03-04 19:26:54 +07:00
parent 3a7d1cfead
commit e08a875d52
4 changed files with 58 additions and 47 deletions

View File

@@ -38,6 +38,7 @@
#define TU_MIN(_x, _y) ( ( (_x) < (_y) ) ? (_x) : (_y) )
#define TU_MAX(_x, _y) ( ( (_x) > (_y) ) ? (_x) : (_y) )
#define TU_U16(_high, _low) ((uint16_t) (((_high) << 8) | (_low)))
#define TU_U16_HIGH(_u16) ((uint8_t) (((_u16) >> 8) & 0x00ff))
#define TU_U16_LOW(_u16) ((uint8_t) ((_u16) & 0x00ff))
#define U16_TO_U8S_BE(_u16) TU_U16_HIGH(_u16), TU_U16_LOW(_u16)