📄 intr_cntl.h
字号:
/*******************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained herein
* is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of INFOMAX COMMUNICATION CO.,LTD.
*
* MODULE NAME:
* DESCRIPTION:
* AUTHOR:
* BEGIN DATE:
* LAST MODIFICATION:
*****************************************************************************/
#ifndef INTR_CNTL_H
#define INTR_CNTL_H
/*******************************************************************************
Header files
*******************************************************************************/
#include "common_var_types.h"
#include "magic_reg_defs.h"
#include "magic_env.h"
/*******************************************************************************
Constant/Marco
*******************************************************************************/
#ifdef MCU_CORE_ARM_7
#define ITRC_BASE itrc_a7_base
#define KEY_ITR_A7 0x00
#define HIF_ITR_A7 0x01
#define GPT_A7_ITR_A7 0x02
#define WDT_ITR_A7 0x03
#define XITR_A7 0x04
#define UART_ITR_A7 0x05
#define COM_A9_ITR_A7 0x06
#define SIMME_ITR_A7 0x07
#define GPDMA_ITR_A7 0x08
#define ABB_ITR_A7 0x09
#define GEA_ITR_A7 0x0a
#define APBP_ITR_A7 0x0b
#define AHBM_ITR_A7 0x0b
#define DRX_ITR_A7 0x0c
#define AUDIO_ITR_A7 0x0d
#define USB_ITR_A7 0x0e
#define NONE_ITR_A7 0x0f
#define KEY_INT_A7 (0x1 << 0x00)
#define HIF_INT_A7 (0x1 << 0x01)
#define GPT_INT_A7 (0x1 << 0x02)
#define WDT_INT_A7 (0x1 << 0x03)
#define XITR_INT_A7 (0x1 << 0x04)
#define UART_INT_A7 (0x1 << 0x05)
#define COM_A9_INT_A7 (0x1 << 0x06)
#define SIMME_INT_A7 (0x1 << 0x07)
#define GPDMA_INT_A7 (0x1 << 0x08)
#define ABB_INT_A7 (0x1 << 0x09)
#define GEA_INT_A7 (0x1 << 0x0a)
#define APBP_INT_A7 (0x1 << 0x0b)
#define AHBM_INT_A7 (0x1 << 0x0b)
#define DRX_INT_A7 (0x1 << 0x0c)
#define AUDIO_INT_A7 (0x1 << 0x0d)
#define USB_INT_A7 (0x1 << 0x0e)
#define NONE_INT_A7 (0x0)
#elif defined MCU_CORE_ARM_9
#define ITRC_BASE itrc_a9_base
#define KEY_ITR_A9 0x00
#define HIF_ITR_A9 0x01
#define GPT_A9_ITR_A9 0x02
#define WDT_ITR_A9 0x03
#define XITR_A9 0x04
#define UART_ITR_A9 0x05
#define REP_A7_ITR_A9 0x06
#define SIMME_ITR_A9 0x07
#define GPDMA_ITR_A9 0x08
#define VDO_ITR_A9 0x09
#define ABB_ITR_A9 0x09
#define GEA_ITR_A9 0x0a
#define AHBM_ITR_A9 0x0b
#define APBP_ITR_A9 0x0b
#define DRX_ITR_A9 0x0c
#define AUDIO_ITR_A9 0x0d
#define USB_ITR_A9 0x0e
#define NONE_ITR_A9 0x0f
#define KEY_INT_A9 (0x1 << 0x00)
#define HIF_INT_A9 (0x1 << 0x01)
#define GPT_INT_A9 (0x1 << 0x02)
#define WDT_INT_A9 (0x1 << 0x03)
#define XITR_INT_A9 (0x1 << 0x04)
#define UART_INT_A9 (0x1 << 0x05)
#define REP_A7_INT_A9 (0x1 << 0x06)
#define SIMME_INT_A9 (0x1 << 0x07)
#define GPDMA_INT_A9 (0x1 << 0x08)
#define VDO_INT_A9 (0x1 << 0x09)
#define ABB_INT_A9 (0x1 << 0x09)
#define GEA_INT_A9 (0x1 << 0x0a)
#define APBP_INT_A9 (0x1 << 0x0b)
#define AHBM_INT_A9 (0x1 << 0x0b)
#define DRX_INT_A9 (0x1 << 0x0c)
#define AUDIO_INT_A9 (0x1 << 0x0d)
#define USB_INT_A9 (0x1 << 0x0e)
#define NONE_INT_A9 (0x0)
#define KEYINT 0x00
#define LCMINT 0x01
#define GPTINT 0x02
#define WDTINT 0x03
#define EXTINT 0x04
#define UART_INTR 0x05
#define REPINT 0x06
#define SIMME_INT 0x07
#define GPDMAINT 0x08
#define RTCINT 0x09
#define GEAINT 0x0a
#define DSPAPBINT 0x0b
#define DRXINT 0x0c
#define AUDIOIFINT 0x0d
#define USBINT 0x0e
#else
#error "Error: Unknown MCU_CORE"
#endif
#define FIQ_SEL_REG ((volatile unsigned *) ITRC_BASE)
#define IRQ_SEL_REG ((volatile unsigned *)(ITRC_BASE + 0x04))
#define PRI_SET_1_REG ((volatile unsigned *)(ITRC_BASE + 0x08))
#define PRI_SET_2_REG ((volatile unsigned *)(ITRC_BASE + 0x0C))
#define IRQ_INDICA_REG ((volatile unsigned *)(ITRC_BASE + 0x10))
#define FIQ_INDICA_REG ((volatile unsigned *)(ITRC_BASE + 0x14))
#define ITR_TSTCTL_REG ((volatile unsigned *)(ITRC_BASE + 0x18))
#define ITR_TSTDAT_REG ((volatile unsigned *)(ITRC_BASE + 0x1C))
/*******************************************************************************
Structure/Union/Enum/Typedef
*******************************************************************************/
typedef struct intr_cntl_priority_conf_sub_S
{
UINT32 pri_1st:4;
UINT32 pri_2nd:4;
UINT32 pri_3rd:4;
UINT32 pri_4th:4;
UINT32 pri_5th:4;
UINT32 pri_6th:4;
UINT32 pri_7th:4;
UINT32 pri_8th:4;
} intr_cntl_priority_conf_sub_T;
typedef struct intr_cntl_priority_conf_S
{
intr_cntl_priority_conf_sub_T sub_0;
intr_cntl_priority_conf_sub_T sub_1;
} intr_cntl_priority_conf_T;
/*******************************************************************************
Function Prototypes
*******************************************************************************/
/**
@Desc
Description for function_name
@Param parameter 1
Put parameter 1 description here
@Param parameter 2
Put parameter 2 description here
@Return Return value 1 and it description
@Return Return value 1 and it description
*/
void intr_cntl_set_priority(intr_cntl_priority_conf_T *intr_cntl_priority_conf_param_p);
void intr_cntl_get_priority(intr_cntl_priority_conf_T *intr_cntl_priority_conf_param_p);
void intr_cntl_IRQ_select(UINT32 IRQ_ID_val);
//void intr_cntl_register_ISR(UINT32 irq_id, *isr_func());
#endif /* #ifndef INTR_CNTL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -