start to support
- usbd host - osal some global define #define TUSB_CFG_HOST_CONTROLLER_NUM #define TUSB_CFG_HOST_DEVICE_MAX #define TUSB_CFG_CONFIGURATION_MAX rename & refractor HID type structure & enum use CException to test asssertion library add test for hid_host_keyboard with usbd configure get & osal queue get stubs update test for assertion library refractor ASSERT_STATUS in assertion library update tusb_error_t values rename usb basic type & enum in tusb_types.h and std_descriptors.h
This commit is contained in:
@@ -74,15 +74,22 @@
|
||||
#include "osal/osal.h"
|
||||
|
||||
|
||||
/// form an uint32_t from 4 x uint8_t
|
||||
static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4) ATTR_ALWAYS_INLINE ATTR_CONST;
|
||||
static inline uint32_t u32_from_u8(uint8_t b1, uint8_t b2, uint8_t b3, uint8_t b4)
|
||||
{
|
||||
return (b1 << 24) + (b2 << 16) + (b3 << 8) + b4;
|
||||
}
|
||||
|
||||
/// min value
|
||||
static inline uint32_t min_of(uint32_t x, uint32_t y) ATTR_ALWAYS_INLINE;
|
||||
static inline uint32_t min_of(uint32_t x, uint32_t y) ATTR_ALWAYS_INLINE ATTR_CONST;
|
||||
static inline uint32_t min_of(uint32_t x, uint32_t y)
|
||||
{
|
||||
return (x < y) ? x : y;
|
||||
}
|
||||
|
||||
/// max value
|
||||
static inline uint32_t max_of(uint32_t x, uint32_t y) ATTR_ALWAYS_INLINE;
|
||||
static inline uint32_t max_of(uint32_t x, uint32_t y) ATTR_ALWAYS_INLINE ATTR_CONST;
|
||||
static inline uint32_t max_of(uint32_t x, uint32_t y)
|
||||
{
|
||||
return (x > y) ? x : y;
|
||||
|
||||
Reference in New Issue
Block a user