1 /*********************************************************************************************************************** 2 * Copyright [2015-2017] Renesas Electronics Corporation and/or its licensors. All Rights Reserved. 3 * 4 * This file is part of Renesas SynergyTM Software Package (SSP) 5 * 6 * The contents of this file (the "contents") are proprietary and confidential to Renesas Electronics Corporation 7 * and/or its licensors ("Renesas") and subject to statutory and contractual protections. 8 * 9 * This file is subject to a Renesas SSP license agreement. Unless otherwise agreed in an SSP license agreement with 10 * Renesas: 1) you may not use, copy, modify, distribute, display, or perform the contents; 2) you may not use any name 11 * or mark of Renesas for advertising or publicity purposes or in connection with your use of the contents; 3) RENESAS 12 * MAKES NO WARRANTY OR REPRESENTATIONS ABOUT THE SUITABILITY OF THE CONTENTS FOR ANY PURPOSE; THE CONTENTS ARE PROVIDED 13 * "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 14 * PARTICULAR PURPOSE, AND NON-INFRINGEMENT; AND 4) RENESAS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, OR 15 * CONSEQUENTIAL DAMAGES, INCLUDING DAMAGES RESULTING FROM LOSS OF USE, DATA, OR PROJECTS, WHETHER IN AN ACTION OF 16 * CONTRACT OR TORT, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE CONTENTS. Third-party contents 17 * included in this file may be subject to different terms. 18 **********************************************************************************************************************/ 19 /*********************************************************************************************************************** 20 * File Name : bsp_group_irq.h 21 * Description : This module allows callbacks to be registered for sources inside a grouped interrupt. For example, the 22 * NMI pin, oscillation stop detect, and WDT underflow interrupts are all mapped to the NMI exception. 23 * Since multiple modules cannot define the same handler, the BSP provides a mechanism to be alerted when 24 * a certain exception occurs. 25 ***********************************************************************************************************************/ 26 27 /*******************************************************************************************************************//** 28 * @ingroup BSP_MCU_COMMON 29 * @defgroup BSP_MCU_GROUP_IRQ Grouped Interrupt Support 30 * 31 * Support for grouped interrupts. Grouped interrupts occur when multiple interrupt events trigger the same interrupt 32 * vector. When this common vector is triggered the activation source must be discovered. The functions in this file 33 * allow users to register a callback function for a single interrupt source in an interrupt group. 34 * 35 * @{ 36 **********************************************************************************************************************/ 37 38 /** @} (end defgroup BSP_MCU_GROUP_IRQ) */ 39 40 #ifndef BSP_GROUP_IRQ_H_ 41 #define BSP_GROUP_IRQ_H_ 42 43 /* Common macro for SSP header files. There is also a corresponding SSP_FOOTER macro at the end of this file. */ 44 SSP_HEADER 45 46 /*********************************************************************************************************************** 47 Macro definitions 48 ***********************************************************************************************************************/ 49 50 /*********************************************************************************************************************** 51 Typedef definitions 52 ***********************************************************************************************************************/ 53 /** Which interrupts can have callbacks registered. */ 54 typedef enum e_bsp_grp_irq 55 { 56 BSP_GRP_IRQ_NMI_PIN, ///< NMI Pin interrupt 57 BSP_GRP_IRQ_OSC_STOP_DETECT, ///< Oscillation stop is detected 58 BSP_GRP_IRQ_WDT_ERROR, ///< WDT underflow/refresh error has occurred 59 BSP_GRP_IRQ_IWDT_ERROR, ///< IWDT underflow/refresh error has occurred 60 BSP_GRP_IRQ_LVD1, ///< Voltage monitoring 1 interrupt 61 BSP_GRP_IRQ_LVD2, ///< Voltage monitoring 2 interrupt 62 BSP_GRP_IRQ_VBATT, ///< VBATT monitor interrupt 63 BSP_GRP_IRQ_RAM_PARITY, ///< RAM Parity Error 64 BSP_GRP_IRQ_RAM_ECC, ///< RAM ECC Error 65 BSP_GRP_IRQ_MPU_BUS_SLAVE, ///< MPU Bus Slave Error 66 BSP_GRP_IRQ_MPU_BUS_MASTER, ///< MPU Bus Master Error 67 BSP_GRP_IRQ_MPU_STACK, ///< MPU Stack Error 68 BSP_GRP_IRQ_TOTAL_ITEMS // DO NOT MODIFY! This is used for sizing internal callback array. 69 } bsp_grp_irq_t; 70 71 /* Callback type. */ 72 typedef void (* bsp_grp_irq_cb_t)(bsp_grp_irq_t irq); 73 74 /*********************************************************************************************************************** 75 Exported global variables 76 ***********************************************************************************************************************/ 77 78 /*********************************************************************************************************************** 79 Exported global functions (to be accessed by other files) 80 ***********************************************************************************************************************/ 81 /* Public functions defined in bsp.h */ 82 void bsp_group_interrupt_open(void); // Used internally by BSP 83 ssp_err_t bsp_group_irq_call(bsp_grp_irq_t irq); // Used internally by BSP 84 85 /* Common macro for SSP header files. There is also a corresponding SSP_HEADER macro at the top of this file. */ 86 SSP_FOOTER 87 88 #endif /* BSP_GROUP_IRQ_H_ */ 89 90