cmsis.h 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2020 Oticon A/S
  3. * Copyright (c) 2021 Codecoup
  4. *
  5. * SPDX-License-Identifier: Apache-2.0
  6. */
  7. /**
  8. * This header defines replacements for inline
  9. * ARM Cortex-M CMSIS intrinsics.
  10. */
  11. #ifndef BOARDS_POSIX_NRF52_BSIM_CMSIS_H
  12. #define BOARDS_POSIX_NRF52_BSIM_CMSIS_H
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /* Implement the following ARM intrinsics as no-op:
  17. * - ARM Data Synchronization Barrier
  18. * - ARM Data Memory Synchronization Barrier
  19. * - ARM Instruction Synchronization Barrier
  20. * - ARM No Operation
  21. */
  22. #ifndef __DMB
  23. #define __DMB()
  24. #endif
  25. #ifndef __DSB
  26. #define __DSB()
  27. #endif
  28. #ifndef __ISB
  29. #define __ISB()
  30. #endif
  31. #ifndef __NOP
  32. #define __NOP()
  33. #endif
  34. void NVIC_SystemReset(void);
  35. void __disable_irq(void);
  36. void __enable_irq(void);
  37. uint32_t __get_PRIMASK(void);
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* BOARDS_POSIX_NRF52_BSIM_CMSIS_H */