diff options
author | edolomb <none@example.com> | 2019-01-17 15:19:20 +0000 |
---|---|---|
committer | edolomb <none@example.com> | 2019-01-17 15:19:20 +0000 |
commit | 29309f101a4828842c377ff11a3a59908aab05f2 (patch) | |
tree | f75aef8484bc3522621b128eb6bfeacd55ad0e47 /os/hal/ports/SAMA/LLD/SDMMCv1/ch_sdmmc_macros.h | |
parent | 696701cd6fe254a4cb2e3f748cacabe853d42a9e (diff) | |
download | ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.gz ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.tar.bz2 ChibiOS-29309f101a4828842c377ff11a3a59908aab05f2.zip |
Updated SAMA drivers (still incomplete)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12543 110e8d01-0319-4d1e-a829-52ad28d1bb01
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))
|