Fork of mbed-dev build 137, last build before FAT file system appears to be broken. Also reduced HSE timeout time in STM4XX HAL
Fork of mbed-dev by
Diff: targets/TARGET_NUVOTON/nu_miscutil.h
- 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);