PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 years ago
12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #ifndef __ASM
  3. #define __ASM __asm
  4. #endif
  5. #ifndef __STATIC_FORCEINLINE
  6. #define __STATIC_FORCEINLINE __attribute__((always_inline)) static inline
  7. #endif
  8. /**
  9. \brief Enable IRQ Interrupts
  10. \details Enables IRQ interrupts by clearing the I-bit in the CPSR.
  11. Can only be executed in Privileged modes.
  12. */
  13. __STATIC_FORCEINLINE void __enable_irq(void)
  14. {
  15. __ASM volatile ("cpsie i" : : : "memory");
  16. }
  17. /**
  18. \brief Disable IRQ Interrupts
  19. \details Disables IRQ interrupts by setting the I-bit in the CPSR.
  20. Can only be executed in Privileged modes.
  21. */
  22. __STATIC_FORCEINLINE void __disable_irq(void)
  23. {
  24. __ASM volatile ("cpsid i" : : : "memory");
  25. }