summaryrefslogtreecommitdiff
path: root/tinyusb/common
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-02-20 16:06:31 +0700
committerhathach <[email protected]>2014-02-20 16:06:31 +0700
commit4b6c6929cbfb4d1b92a62df84f92e83fa861f4d8 (patch)
tree818eecd011c64a644e712e8c4080e16fc7f30c7e /tinyusb/common
parent533c8d2eed68fe76242fa5dcd2b1733d6278a4e8 (diff)
fix the duplicated plug connection status change with lpc17xx by using immediate reset on isr. However Khanh's G5 mouse is not enumerated !!
remove TUSB_CFG_CONFIGURATION_MAX from config file fix some warning
Diffstat (limited to 'tinyusb/common')
-rw-r--r--tinyusb/common/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tinyusb/common/common.h b/tinyusb/common/common.h
index ecc7bf425..4933634d2 100644
--- a/tinyusb/common/common.h
+++ b/tinyusb/common/common.h
@@ -228,6 +228,13 @@ static inline uint32_t offset4k(uint32_t value)
}
//------------- Mathematics -------------//
+static inline uint32_t abs_of(int32_t value) ATTR_ALWAYS_INLINE ATTR_CONST;
+static inline uint32_t abs_of(int32_t value)
+{
+ return (value < 0) ? (-value) : value;
+}
+
+
/// inclusive range checking
static inline bool is_in_range(uint32_t lower, uint32_t value, uint32_t upper) ATTR_ALWAYS_INLINE ATTR_CONST;
static inline bool is_in_range(uint32_t lower, uint32_t value, uint32_t upper)