⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hal_interrupt.h

📁 最新版IAR FOR ARM(EWARM)5.11中的代码例子
💻 H
字号:
/************************************************************************/
/*                                                                      */
/*    Copyright (C) 2006 Oki Electric Industry Co., LTD.                */
/*                                                                      */
/*    System Name    :  uPLAT7D series                                  */
/*    Module Name    :  uPLAT7D intterupt HAL program                   */
/*    File   Name    :  hal_interrupt.h                                 */
/*    Date           :  2005/12/21 initial version                      */
/*                                                                      */
/************************************************************************/

#ifndef HAL_INTERRUPT_H
#define HAL_INTERRUPT_H


/******************************/
/*          typedef           */
/******************************/
typedef struct uPLAT_InterruptParam {
    uint16_t primary;    /* Kind of interrupt. */
    uint32_t level;      /* Level of interrupt. */
    uint32_t mode;       /* Detection mode of interrupt. */
    VFI callback;        /* Pointer of Call back function.*/
} uPLAT_InterruptParam;

#define IRQSIZE 64
extern FP  IRQ_HANDLER_TABLE[IRQSIZE];
extern VFI CALL_BACK_TABLE[IRQSIZE];

/******************************/
/*   Functions declaration    */
/******************************/
extern void HALInterrupt_InitAll(void);
extern int16_t HALInterrupt_SetPrimary(const uPLAT_InterruptParam *param);
extern void fiq_handler(void);

#if defined(__arm) // this is taken care of by intrinsics.h for IAR toolchain

/************************************************************************/
/*                                                                      */
/*  Function Name   : irq_en                                            */
/*  Input           : void                                              */
/*  Output          : void                                              */
/*                                                                      */
/*  Note : Enable IRQ.                                                  */
/*                                                                      */
/************************************************************************/
//__swi(0x0) uint32_t irq_en(void);

/************************************************************************/
/*                                                                      */
/*  Function Name   : irq_dis                                           */
/*  Input           : void                                              */
/*  Output          : void                                              */
/*                                                                      */
/*  Note : Disable IRQ.                                                 */
/*                                                                      */
/************************************************************************/
//__swi(0x1) uint32_t irq_dis(void);

/************************************************************************/
/*                                                                      */
/*  Function Name   : fiq_en                                            */
/*  Input           : void                                              */
/*  Output          : void                                              */
/*                                                                      */
/*  Note : Enable FIQ.                                                  */
/*                                                                      */
/************************************************************************/
//__swi(0x2) uint32_t fiq_en(void);

/************************************************************************/
/*                                                                      */
/*  Function Name   : fiq_dis                                           */
/*  Input           : void                                              */
/*  Output          : void                                              */
/*                                                                      */
/*  Note : Disable FIQ.                                                 */
/*                                                                      */
/************************************************************************/
//__swi(0x3) uint32_t fiq_dis(void);

#else

/* Only for VC++ compile */
inline uint32_t irq_en(void)   return 0;

inline uint32_t irq_dis(void)  return 0;

inline  uint32_t fiq_en(void)    return 0;

inline uint32_t fiq_dis(void)     return 0;


#endif


#endif  /* end of HAL_INTERRUPT_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -