- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

# /space/home/slher/rel/Beken/v6_4_5/macsw/modules/ke/src/ke_event.h

Go to the documentation of this file.

    00001
    00013 #ifndef _KE_EVENT_H_
    00014 #define _KE_EVENT_H_
    00015
    00041 /*
    00042  * INCLUDE FILES
    00043  ****************************************************************************************
    00044  */
    00045 // for target dependent directives
    00046 #include "rwnx_config.h"
    00047 // for ke environment
    00048 #include "ke_env.h"
    00049 // for CO_BIT
    00050 #include "co_math.h"
    00051
    00052 /*
    00053  * CONSTANTS
    00054  ****************************************************************************************
    00055  */
    00058
    00063 enum
    00064 {
    00065     KE_EVT_RESET = 0,
    00066     #if NX_GP_DMA
    00067     KE_EVT_GP_DMA_UL,
    00068     #endif
    00069     #if NX_MM_TIMER
    00070     KE_EVT_MM_TIMER,
    00071     #endif
    00072     KE_EVT_KE_TIMER,
    00073     KE_EVT_MACIF_MSG,
    00074     KE_EVT_KE_MESSAGE,
    00075     KE_EVT_HW_IDLE,
    00076     #if NX_BEACONING || ((NX_POWERSAVE || NX_CONNECTION_MONITOR || NX_UMAC_PRESENT) && !NX_MULTI_ROLE)
    00077     KE_EVT_PRIMARY_TBTT,
    00078     #endif
    00079     #if NX_BEACONING
    00080     KE_EVT_SECONDARY_TBTT,
    00081     #endif
    00082     KE_EVT_RXUPLOADED,
    00083     #if NX_UMAC_PRESENT
    00084     KE_EVT_RXUREADY,
    00085     #endif
    00086     KE_EVT_RXREADY,
    00087     #if NX_TX_FRAME
    00088     KE_EVT_TXFRAME_CFM,
    00089     #endif
    00090     #if NX_BEACONING
    00091     KE_EVT_TXCFM_BCN,
    00092     #endif
    00093     KE_EVT_TXCFM_AC3,
    00094     KE_EVT_TXCFM_AC2,
    00095     KE_EVT_TXCFM_AC1,
    00096     KE_EVT_TXCFM_AC0,
    00097     #if NX_BEACONING
    00098     KE_EVT_MACIF_TXDESC_BCN,
    00099     #endif
    00100     KE_EVT_MACIF_TXDESC_AC3,
    00101     KE_EVT_MACIF_TXDESC_AC2,
    00102     KE_EVT_MACIF_TXDESC_AC1,
    00103     KE_EVT_MACIF_TXDESC_AC0,
    00104     #if NX_GP_DMA
    00105     KE_EVT_GP_DMA_DL,
    00106     #endif
    00107     KE_EVT_MAX
    00108 };
    00109
    00110 #define KE_EVT_RESET_BIT          CO_BIT(31 - KE_EVT_RESET)
    00111 #if NX_MM_TIMER
    00112 #define KE_EVT_MM_TIMER_BIT       CO_BIT(31 - KE_EVT_MM_TIMER)
    00113 #endif
    00114 #define KE_EVT_KE_TIMER_BIT       CO_BIT(31 - KE_EVT_KE_TIMER)
    00115 #define KE_EVT_KE_MESSAGE_BIT     CO_BIT(31 - KE_EVT_KE_MESSAGE)
    00116 #define KE_EVT_HW_IDLE_BIT        CO_BIT(31 - KE_EVT_HW_IDLE)
    00117 #if NX_BEACONING || ((NX_POWERSAVE || NX_CONNECTION_MONITOR || NX_UMAC_PRESENT) && !NX_MULTI_ROLE)
    00118 #define KE_EVT_PRIMARY_TBTT_BIT   CO_BIT(31 - KE_EVT_PRIMARY_TBTT)
    00119 #else
    00120 #define KE_EVT_PRIMARY_TBTT_BIT   0
    00121 #endif
    00122 #if NX_BEACONING
    00123 #define KE_EVT_SECONDARY_TBTT_BIT CO_BIT(31 - KE_EVT_SECONDARY_TBTT)
    00124 #endif
    00125 #if NX_UMAC_PRESENT
    00126 #define KE_EVT_RXUREADY_BIT       CO_BIT(31 - KE_EVT_RXUREADY)
    00127 #endif
    00128 #define KE_EVT_RXREADY_BIT        CO_BIT(31 - KE_EVT_RXREADY)
    00129 #define KE_EVT_RXUPLOADED_BIT     CO_BIT(31 - KE_EVT_RXUPLOADED)
    00130 #if NX_TX_FRAME
    00131 #define KE_EVT_TXFRAME_CFM_BIT    CO_BIT(31 - KE_EVT_TXFRAME_CFM)
    00132 #endif
    00133 #if NX_BEACONING
    00134 #define KE_EVT_MACIF_TXDESC_BCN_BIT CO_BIT(31 - KE_EVT_MACIF_TXDESC_BCN)
    00135 #endif
    00136 #define KE_EVT_MACIF_TXDESC_AC3_BIT CO_BIT(31 - KE_EVT_MACIF_TXDESC_AC3)
    00137 #define KE_EVT_MACIF_TXDESC_AC2_BIT CO_BIT(31 - KE_EVT_MACIF_TXDESC_AC2)
    00138 #define KE_EVT_MACIF_TXDESC_AC1_BIT CO_BIT(31 - KE_EVT_MACIF_TXDESC_AC1)
    00139 #define KE_EVT_MACIF_TXDESC_AC0_BIT CO_BIT(31 - KE_EVT_MACIF_TXDESC_AC0)
    00140 #define KE_EVT_MACIF_MSG_BIT            CO_BIT(31 - KE_EVT_MACIF_MSG)
    00141 #if NX_BEACONING
    00142 #define KE_EVT_TXCFM_BCN_BIT      CO_BIT(31 - KE_EVT_TXCFM_BCN)
    00143 #endif
    00144 #define KE_EVT_TXCFM_AC0_BIT      CO_BIT(31 - KE_EVT_TXCFM_AC0)
    00145 #define KE_EVT_TXCFM_AC1_BIT      CO_BIT(31 - KE_EVT_TXCFM_AC1)
    00146 #define KE_EVT_TXCFM_AC2_BIT      CO_BIT(31 - KE_EVT_TXCFM_AC2)
    00147 #define KE_EVT_TXCFM_AC3_BIT      CO_BIT(31 - KE_EVT_TXCFM_AC3)
    00148 #if NX_GP_DMA
    00149 #define KE_EVT_GP_DMA_DL_BIT      CO_BIT(31 - KE_EVT_GP_DMA_DL)
    00150 #define KE_EVT_GP_DMA_UL_BIT      CO_BIT(31 - KE_EVT_GP_DMA_UL)
    00151 #endif
    00152
    00154 #if NX_BEACONING
    00155 #define KE_EVT_TXCFM_MASK   ( KE_EVT_TXCFM_AC0_BIT  \
    00156                             | KE_EVT_TXCFM_AC1_BIT  \
    00157                             | KE_EVT_TXCFM_AC2_BIT  \
    00158                             | KE_EVT_TXCFM_AC3_BIT  \
    00159                             | KE_EVT_TXCFM_BCN_BIT)
    00160 #else
    00161 #define KE_EVT_TXCFM_MASK   ( KE_EVT_TXCFM_AC0_BIT  \
    00162                             | KE_EVT_TXCFM_AC1_BIT  \
    00163                             | KE_EVT_TXCFM_AC2_BIT  \
    00164                             | KE_EVT_TXCFM_AC3_BIT)
    00165 #endif
    00166
    00168
    00169 /*
    00170  * MACROS
    00171  ****************************************************************************************
    00172  */
    00174 __INLINE evt_field_t ke_evt_get(void)
    00175 {
    00176     return ke_env.evt_field;
    00177 }
    00178
    00179 /*
    00180  * FUNCTION PROTOTYPES
    00181  ****************************************************************************************
    00182  */
    00183 void ke_evt_set(evt_field_t const);
    00184
    00185 void ke_evt_clear(evt_field_t const);
    00186
    00187 void ke_evt_schedule(void);
    00188
    00189 void ke_init(void);
    00190
    00191 void ke_flush(void);
    00192
    00194
    00195 #endif //_KE_EVENT_H_