irq.h

Go to the documentation of this file.
00001 /****************************************************************************/
00018 #ifndef _IRQ_H
00019 #define _IRQ_H
00020 
00021 /******************************************************************************
00022                    Includes section
00023 ******************************************************************************/
00024 #include <types.h>
00025 
00026 /******************************************************************************
00027                    Types section
00028 ******************************************************************************/
00030 typedef enum
00031 {
00033   IRQ_0 = 0,
00035   IRQ_1 = 1,
00036   IRQ_2 = 2,
00037   IRQ_3 = 3,
00038   IRQ_4 = 4,
00039   IRQ_5 = 5,
00041   IRQ_6 = 6,
00043   IRQ_7 = 7
00044 } HAL_IrqNumber_t;
00045 
00047 typedef enum
00048 {
00050   IRQ_LOW_LEVEL,
00052   IRQ_HIGH_LEVEL,
00054   IRQ_ANY_EDGE,
00056   IRQ_FALLING_EDGE,
00058   IRQ_RISING_EDGE
00059 } HAL_IrqMode_t;
00060 
00061 /******************************************************************************
00062                    Prototypes section
00063 ******************************************************************************/
00064 /**************************************************************************/
00088 int HAL_RegisterIrq(HAL_IrqNumber_t irqNumber, HAL_IrqMode_t irqMode, void (*f)(void));
00089 
00090 /******************************************************************************
00091 \brief Enables the irqNumber interrupt
00092 \param[in]
00093    irqNumber - IRQ number
00094 \return
00095    -1 - if irqNumber is out of range or has not been registered yet. \n
00096     0 - otherwise.
00097 ******************************************************************************/
00098 int HAL_EnableIrq(HAL_IrqNumber_t irqNumber);
00099 
00100 /******************************************************************************
00101 \brief Disables the irqNumber interrupt
00102 \param[in]
00103    irqNumber - IRQ number
00104 \return
00105    -1 - if irqNumber is out of range or has not been registered yet. \n
00106     0 - otherwise.
00107 ******************************************************************************/
00108 int HAL_DisableIrq(HAL_IrqNumber_t irqNumber);
00109 
00110 /******************************************************************************
00111 \brief Unregisters the user's irqNumber interrupt
00112 \param[in]
00113    irqNumber - IRQ number
00114 \return
00115    -1 - if irqNumber is out of range or has not been registered yet. \n
00116     0 - otherwise.
00117 ******************************************************************************/
00118 int HAL_UnregisterIrq(HAL_IrqNumber_t irqNumber);
00119 
00120 #endif /* _IRQ_H */
00121 //eof irq.h

Generated on Mon Feb 16 17:53:40 2009 for BitCloud Stack Documentation by  doxygen 1.5.1-p1