sama_cache.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @file SAMA5D2x/sama_cache.h
  15. * @brief SAMA CACHE support macros and structures.
  16. *
  17. * @addtogroup SAMA5D2x_CACHE
  18. * @{
  19. */
  20. #ifndef SAMA_CACHE_H_
  21. #define SAMA_CACHE_H_
  22. /*===========================================================================*/
  23. /* Driver constants. */
  24. /*===========================================================================*/
  25. #define L1_CACHE_BYTES 32u
  26. #define L2_CACHE_BYTES 32u
  27. #define CACHE_ALIGNED ALIGNED_VAR(L1_CACHE_BYTES)
  28. #define NO_CACHE __attribute__((section (".nocache")))
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. extern void cacheInvalidateRegion(void *start, uint32_t length);
  33. extern void cacheCleanRegion(void *start, uint32_t length);
  34. extern void cacheCleanInvalidateRegion(void *start, uint32_t length);
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* SAMA_CACHE_H_ */
  39. /** @} */