mbed library sources. Supersedes mbed-src.

Dependents:   Hobbyking_Cheetah_Compact Hobbyking_Cheetah_Compact_DRV8323_14bit Hobbyking_Cheetah_Compact_DRV8323_V51_201907 HKC_MiniCheetah ... more

Fork of mbed-dev by mbed official

Revision:
159:612c381a210f
Parent:
149:156823d33999
--- a/targets/TARGET_NUVOTON/nu_miscutil.h	Tue Feb 14 14:44:10 2017 +0000
+++ b/targets/TARGET_NUVOTON/nu_miscutil.h	Tue Feb 28 17:13:35 2017 +0000
@@ -24,6 +24,8 @@
 #define NU_MAX(a,b) ((a)>(b)?(a):(b))
 #define NU_MIN(a,b) ((a)<(b)?(a):(b))
 #define NU_CLAMP(x, min, max)   NU_MIN(NU_MAX((x), (min)), (max))
+#define NU_ALIGN_DOWN(X, ALIGN)     ((X) & ~((ALIGN) - 1))
+#define NU_ALIGN_UP(X, ALIGN)       (((X) + (ALIGN) - 1) & ~((ALIGN) - 1))
 
 void nu_nop(uint32_t n);