intc.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * \file
  3. *
  4. * \brief INTC software driver API for AVR UC3 devices.
  5. *
  6. * Copyright (c) 2009-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 _INTC_H_
  37. #define _INTC_H_
  38. #include "compiler.h"
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. /**
  43. * \defgroup intc_group INTC Software Driver API for AVR UC3
  44. *
  45. * This is a software module to register interrupt handlers at any specified
  46. * interrupt level to any interrupt line managed by the INTC module in AVR UC3
  47. * devices.
  48. * @{
  49. */
  50. //! Maximal number of interrupt request lines per group.
  51. #define AVR32_INTC_MAX_NUM_IRQS_PER_GRP 32
  52. //! Number of interrupt priority levels.
  53. #define AVR32_INTC_NUM_INT_LEVELS (1 << AVR32_INTC_IPR_INTLEVEL_SIZE)
  54. #ifdef __AVR32_ABI_COMPILER__
  55. // (Automatically defined when compiling for AVR UC3, not when assembling).
  56. extern void INTC_init_interrupts(void);
  57. extern void INTC_register_interrupt(__int_handler handler, uint32_t irq,
  58. uint32_t int_level);
  59. #endif // __AVR32_ABI_COMPILER__
  60. //! @}
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64. #endif // _INTC_H_