Просмотр исходного кода

fix(common/usb_util): fix missing __ICCARM_V8 define

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu 5 месяцев назад
Родитель
Сommit
4ab097d9dc
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      common/usb_util.h

+ 6 - 0
common/usb_util.h

@@ -45,6 +45,12 @@
 #define __ALIGNED(x) __attribute__((aligned(x)))
 #define __ALIGNED(x) __attribute__((aligned(x)))
 #endif
 #endif
 #elif defined(__ICCARM__) || defined(__ICCRX__) || defined(__ICCRISCV__)
 #elif defined(__ICCARM__) || defined(__ICCRX__) || defined(__ICCRISCV__)
+#if (__VER__ >= 8000000)
+  #define __ICCARM_V8 1
+#else
+  #define __ICCARM_V8 0
+#endif
+
 #ifndef __USED
 #ifndef __USED
 #if defined(__ICCARM_V8) || defined(__ICCRISCV__)
 #if defined(__ICCARM_V8) || defined(__ICCRISCV__)
 #define __USED __attribute__((used))
 #define __USED __attribute__((used))