diff options
| author | sakumisu <[email protected]> | 2022-01-29 23:15:36 +0800 |
|---|---|---|
| committer | sakimusu <[email protected]> | 2022-01-30 22:05:09 +0800 |
| commit | aaee8a840b413e31fdb4e50123c19f1a005b6a68 (patch) | |
| tree | 0cb4456c3c9df66ae2fc1511422608d4cebc1ec7 /common/usb_util.h | |
| parent | f24997db449f48f48273682708757f18232c42fa (diff) | |
add memory wrapper and errno util
Diffstat (limited to 'common/usb_util.h')
| -rw-r--r-- | common/usb_util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/usb_util.h b/common/usb_util.h index 441d0a3f..ab4eb693 100644 --- a/common/usb_util.h +++ b/common/usb_util.h @@ -28,7 +28,9 @@ #include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-#include "usb_slist.h"
+#include "usb_errno.h"
+#include "usb_list.h"
+#include "usb_mem.h"
#if defined(__CC_ARM)
#ifndef __USED
@@ -288,4 +290,11 @@ #define USB_LOG_ERR(...)
#endif
+void usb_assert(const char *filename, int linenum);
+#define USB_ASSERT(f) \
+ do { \
+ if (!(f)) \
+ usb_assert(__FILE__, __LINE__); \
+ } while (0)
+
#endif
|
