Home | History | Annotate | Download | only in Inc
      1 /****************************************************************************
      2 **+-----------------------------------------------------------------------+**
      3 **|                                                                       |**
      4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
      5 **| All rights reserved.                                                  |**
      6 **|                                                                       |**
      7 **| Redistribution and use in source and binary forms, with or without    |**
      8 **| modification, are permitted provided that the following conditions    |**
      9 **| are met:                                                              |**
     10 **|                                                                       |**
     11 **|  * Redistributions of source code must retain the above copyright     |**
     12 **|    notice, this list of conditions and the following disclaimer.      |**
     13 **|  * Redistributions in binary form must reproduce the above copyright  |**
     14 **|    notice, this list of conditions and the following disclaimer in    |**
     15 **|    the documentation and/or other materials provided with the         |**
     16 **|    distribution.                                                      |**
     17 **|  * Neither the name Texas Instruments nor the names of its            |**
     18 **|    contributors may be used to endorse or promote products derived    |**
     19 **|    from this software without specific prior written permission.      |**
     20 **|                                                                       |**
     21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     32 **|                                                                       |**
     33 **+-----------------------------------------------------------------------+**
     34 ****************************************************************************/
     35 
     36 /**********************************************************************************/
     37 /*                                                                                */
     38 /*   MODULE:  ElpCtrl.h															  */
     39 /*   PURPOSE: ElpCtrl api file													  */
     40 /*                                                                                */
     41 /**********************************************************************************/
     42 #ifndef _ELP_CONTROLLER_H_
     43 #define _ELP_CONTROLLER_H_
     44 
     45 /*****************************************************************************
     46  **         MACRO	                                                       **
     47  *****************************************************************************/
     48 
     49 /* ELP register commands */
     50 #define ELPCTRL_WAKE_UP             0x1
     51 #define ELPCTRL_WAKE_UP_WLAN_READY  0x5
     52 #define ELPCTRL_SLEEP               0x0
     53 /* ELP WLAN_READY bit */
     54 #define ELPCTRL_WLAN_READY          0x2
     55 
     56 
     57 /*****************************************************************************
     58  **         Enums                                                    **
     59  *****************************************************************************/
     60 
     61 /* ELP Control API return values */
     62 typedef enum
     63 {
     64     ELPCTRL_COMPLETE,
     65     ELPCTRL_PENDING,
     66     ELPCTRL_ERROR,
     67     ELPCTRL_AWAKE,
     68     ELPCTRL_ASLEEP,
     69     ELPCTRL_WLAN_RDY,
     70     ELPCTRL_WLAN_RDY_COMPLETE
     71 
     72 } elpCtrl_e;
     73 
     74  /*****************************************************************************
     75  **         Types	                                                       **
     76  *****************************************************************************/
     77 
     78 
     79 /*****************************************************************************
     80  **         Structures                                                      **
     81  *****************************************************************************/
     82 
     83 
     84 /*****************************************************************************
     85  **         External functions definitions                                  **
     86  *****************************************************************************/
     87 TI_HANDLE elpCtrl_Create    (TI_HANDLE hOs);
     88 int       elpCtrl_Destroy   (TI_HANDLE hElpCtrl);
     89 int       elpCtrl_Configure (TI_HANDLE hElpCtrl, TI_HANDLE hTNETWIF, TNETWIF_callback_t fCb);
     90 int       elpCtrl_Wake      (TI_HANDLE hElpCtrl, BOOL bHwAvail);
     91 int       elpCtrl_Sleep     (TI_HANDLE hElpCtrl);
     92 int       elpCtrl_UnMux       (TI_HANDLE hElpCtrl);
     93 int       elpCtrl_Mode      (TI_HANDLE hElpCtrl, elpCtrl_Mode_e aMode);
     94 int       elpCtrl_Stop      (TI_HANDLE hElpCtrl);
     95 int       elpCtrl_Start     (TI_HANDLE hElpCtrl);
     96 BOOL      elpCtrl_isIRQComing (TI_HANDLE hElpCtrl);
     97 elpCtrl_e elpCtrl_exitWakeUpSeq (TI_HANDLE hElpCtrl);
     98 void      elpCtrl_ReceivedIRQ (TI_HANDLE hElpCtrl);
     99 
    100 void 	  elpCtrl_RegisterFailureEventCB
    101                             (TI_HANDLE hElpCtrl, void *fFail, TI_HANDLE hFail);
    102 
    103 
    104 #endif /* _ELP_CONTROLLER_H_ */
    105 
    106