diff options
Diffstat (limited to 'os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h')
-rw-r--r-- | os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h b/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h index 52f82fd03..c973d1e4a 100644 --- a/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h +++ b/os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h @@ -2,12 +2,21 @@ #define CH_SDMMC_MACROS_H_
-
+#if !defined(CACHE_ALIGNED)
#define CACHE_ALIGNED __attribute__((aligned(L1_CACHE_BYTES)))
+#endif
+/*
+ * @brief NO CACHE attribute
+ */
+#if !defined(NO_CACHE)
+#define NO_CACHE __attribute__((section (".nocache")))
+#endif
#define IS_CACHE_ALIGNED(x) ((((uint32_t)(x)) & (L1_CACHE_BYTES - 1)) == 0)
+#if !defined(ROUND_INT_DIV)
#define ROUND_INT_DIV(n,d) (((n) + ((d)-1)) / (d))
+#endif
#define ROUND_UP_MULT(x,m) (((x) + ((m)-1)) & ~((m)-1))
#define CEIL_INT_DIV(n,d) (((n) + (d) - 1) / (d))
#define ABS_DIFF(a,b) ((a) < (b) ? (b) - (a) : (a) - (b))
|