xref: /btstack/port/renesas-ek-ra6m4a-da14531/e2-project/ra/fsp/src/bsp/mcu/all/bsp_group_irq.h (revision c30869498fb8e98c1408c9db0e7624f02f483b73)
1 /***********************************************************************************************************************
2  * Copyright [2020-2022] Renesas Electronics Corporation and/or its affiliates.  All Rights Reserved.
3  *
4  * This software and documentation are supplied by Renesas Electronics America Inc. and may only be used with products
5  * of Renesas Electronics Corp. and its affiliates ("Renesas").  No other uses are authorized.  Renesas products are
6  * sold pursuant to Renesas terms and conditions of sale.  Purchasers are solely responsible for the selection and use
7  * of Renesas products and Renesas assumes no liability.  No license, express or implied, to any intellectual property
8  * right is granted by Renesas. This software is protected under all applicable laws, including copyright laws. Renesas
9  * reserves the right to change or discontinue this software and/or this documentation. THE SOFTWARE AND DOCUMENTATION
10  * IS DELIVERED TO YOU "AS IS," AND RENESAS MAKES NO REPRESENTATIONS OR WARRANTIES, AND TO THE FULLEST EXTENT
11  * PERMISSIBLE UNDER APPLICABLE LAW, DISCLAIMS ALL WARRANTIES, WHETHER EXPLICITLY OR IMPLICITLY, INCLUDING WARRANTIES
12  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT, WITH RESPECT TO THE SOFTWARE OR
13  * DOCUMENTATION.  RENESAS SHALL HAVE NO LIABILITY ARISING OUT OF ANY SECURITY VULNERABILITY OR BREACH.  TO THE MAXIMUM
14  * EXTENT PERMITTED BY LAW, IN NO EVENT WILL RENESAS BE LIABLE TO YOU IN CONNECTION WITH THE SOFTWARE OR DOCUMENTATION
15  * (OR ANY PERSON OR ENTITY CLAIMING RIGHTS DERIVED FROM YOU) FOR ANY LOSS, DAMAGES, OR CLAIMS WHATSOEVER, INCLUDING,
16  * WITHOUT LIMITATION, ANY DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, PUNITIVE, OR INCIDENTAL DAMAGES; ANY LOST PROFITS,
17  * OTHER ECONOMIC DAMAGE, PROPERTY DAMAGE, OR PERSONAL INJURY; AND EVEN IF RENESAS HAS BEEN ADVISED OF THE POSSIBILITY
18  * OF SUCH LOSS, DAMAGES, CLAIMS OR COSTS.
19  **********************************************************************************************************************/
20 
21 #ifndef BSP_GROUP_IRQ_H
22 #define BSP_GROUP_IRQ_H
23 
24 /** Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
25 FSP_HEADER
26 
27 /*******************************************************************************************************************//**
28  * @addtogroup BSP_MCU
29  *
30  * @{
31  **********************************************************************************************************************/
32 
33 /***********************************************************************************************************************
34  * Macro definitions
35  **********************************************************************************************************************/
36 
37 /***********************************************************************************************************************
38  * Typedef definitions
39  **********************************************************************************************************************/
40 
41 /** Which interrupts can have callbacks registered. */
42 typedef enum e_bsp_grp_irq
43 {
44     BSP_GRP_IRQ_IWDT_ERROR      = 0,   ///< IWDT underflow/refresh error has occurred
45     BSP_GRP_IRQ_WDT_ERROR       = 1,   ///< WDT underflow/refresh error has occurred
46     BSP_GRP_IRQ_LVD1            = 2,   ///< Voltage monitoring 1 interrupt
47     BSP_GRP_IRQ_LVD2            = 3,   ///< Voltage monitoring 2 interrupt
48     BSP_GRP_IRQ_VBATT           = 4,   ///< VBATT monitor interrupt
49     BSP_GRP_IRQ_OSC_STOP_DETECT = 6,   ///< Oscillation stop is detected
50     BSP_GRP_IRQ_NMI_PIN         = 7,   ///< NMI Pin interrupt
51     BSP_GRP_IRQ_RAM_PARITY      = 8,   ///< RAM Parity Error
52     BSP_GRP_IRQ_RAM_ECC         = 9,   ///< RAM ECC Error
53     BSP_GRP_IRQ_MPU_BUS_SLAVE   = 10,  ///< MPU Bus Slave Error
54     BSP_GRP_IRQ_MPU_BUS_MASTER  = 11,  ///< MPU Bus Master Error
55     BSP_GRP_IRQ_MPU_STACK       = 12,  ///< MPU Stack Error
56     BSP_GRP_IRQ_TRUSTZONE       = 13,  ///< MPU Stack Error
57     BSP_GRP_IRQ_CACHE_PARITY    = 15,  ///< MPU Stack Error
58 } bsp_grp_irq_t;
59 
60 /* Callback type. */
61 typedef void (* bsp_grp_irq_cb_t)(bsp_grp_irq_t irq);
62 
63 /** @} (end addtogroup BSP_MCU) */
64 
65 /***********************************************************************************************************************
66  * Exported global variables
67  **********************************************************************************************************************/
68 
69 /***********************************************************************************************************************
70  * Exported global functions (to be accessed by other files)
71  **********************************************************************************************************************/
72 
73 /* Public functions defined in bsp.h */
74 void bsp_group_interrupt_open(void);   // Used internally by BSP
75 
76 /** Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
77 FSP_FOOTER
78 
79 #endif
80