Europalab Devices produces a LoRaWAN transmitting client node, specialised for higher research of actuator and sensor assisted IoT networks. https://dev.europalab.com/nlnet/20200000/
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.

133 lines
3.4KB

  1. /**
  2. * \file
  3. *
  4. * \brief Global interrupt management for 8- and 32-bit AVR
  5. *
  6. * Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
  7. *
  8. * \asf_license_start
  9. *
  10. * \page License
  11. *
  12. * Subject to your compliance with these terms, you may use Microchip
  13. * software and any derivatives exclusively with Microchip products.
  14. * It is your responsibility to comply with third party license terms applicable
  15. * to your use of third party software (including open source software) that
  16. * may accompany Microchip software.
  17. *
  18. * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
  19. * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
  20. * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
  21. * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
  22. * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
  23. * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
  24. * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
  25. * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
  26. * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
  27. * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
  28. * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
  29. *
  30. * \asf_license_stop
  31. *
  32. */
  33. /*
  34. * Support and FAQ: visit <a href="https://www.microchip.com/support/">Microchip Support</a>
  35. */
  36. #ifndef UTILS_INTERRUPT_H
  37. #define UTILS_INTERRUPT_H
  38. #include <parts.h>
  39. #if XMEGA || MEGA
  40. # include "interrupt/interrupt_avr8.h"
  41. #elif UC3
  42. # include "interrupt/interrupt_avr32.h"
  43. #elif SAM || SAMB
  44. # include "interrupt/interrupt_sam_nvic.h"
  45. #else
  46. # error Unsupported device.
  47. #endif
  48. /**
  49. * \defgroup interrupt_group Global interrupt management
  50. *
  51. * This is a driver for global enabling and disabling of interrupts.
  52. *
  53. * @{
  54. */
  55. #if defined(__DOXYGEN__)
  56. /**
  57. * \def CONFIG_INTERRUPT_FORCE_INTC
  58. * \brief Force usage of the ASF INTC driver
  59. *
  60. * Predefine this symbol when preprocessing to force the use of the ASF INTC driver.
  61. * This is useful to ensure compatibility across compilers and shall be used only when required
  62. * by the application needs.
  63. */
  64. # define CONFIG_INTERRUPT_FORCE_INTC
  65. #endif
  66. //! \name Global interrupt flags
  67. //@{
  68. /**
  69. * \typedef irqflags_t
  70. * \brief Type used for holding state of interrupt flag
  71. */
  72. /**
  73. * \def cpu_irq_enable
  74. * \brief Enable interrupts globally
  75. */
  76. /**
  77. * \def cpu_irq_disable
  78. * \brief Disable interrupts globally
  79. */
  80. /**
  81. * \fn irqflags_t cpu_irq_save(void)
  82. * \brief Get and clear the global interrupt flags
  83. *
  84. * Use in conjunction with \ref cpu_irq_restore.
  85. *
  86. * \return Current state of interrupt flags.
  87. *
  88. * \note This function leaves interrupts disabled.
  89. */
  90. /**
  91. * \fn void cpu_irq_restore(irqflags_t flags)
  92. * \brief Restore global interrupt flags
  93. *
  94. * Use in conjunction with \ref cpu_irq_save.
  95. *
  96. * \param flags State to set interrupt flag to.
  97. */
  98. /**
  99. * \fn bool cpu_irq_is_enabled_flags(irqflags_t flags)
  100. * \brief Check if interrupts are globally enabled in supplied flags
  101. *
  102. * \param flags Currents state of interrupt flags.
  103. *
  104. * \return True if interrupts are enabled.
  105. */
  106. /**
  107. * \def cpu_irq_is_enabled
  108. * \brief Check if interrupts are globally enabled
  109. *
  110. * \return True if interrupts are enabled.
  111. */
  112. //@}
  113. //! @}
  114. /**
  115. * \ingroup interrupt_group
  116. * \defgroup interrupt_deprecated_group Deprecated interrupt definitions
  117. */
  118. #endif /* UTILS_INTERRUPT_H */