TWD/FW_Transfer/Export_Inc/eventMbox_api.h
changeset 0 10c42ec6c05f
equal deleted inserted replaced
-1:000000000000 0:10c42ec6c05f
       
     1 /*
       
     2  * eventMbox_api.h
       
     3  *
       
     4  * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.      
       
     5  * All rights reserved.      
       
     6  * 
       
     7  * This program and the accompanying materials are made available under the 
       
     8  * terms of the Eclipse Public License v1.0 or BSD License which accompanies
       
     9  * this distribution. The Eclipse Public License is available at
       
    10  * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below.                                   
       
    11  *                                                                       
       
    12  * Redistribution and use in source and binary forms, with or without    
       
    13  * modification, are permitted provided that the following conditions    
       
    14  * are met:                                                              
       
    15  *                                                                       
       
    16  *  * Redistributions of source code must retain the above copyright     
       
    17  *    notice, this list of conditions and the following disclaimer.      
       
    18  *  * Redistributions in binary form must reproduce the above copyright  
       
    19  *    notice, this list of conditions and the following disclaimer in    
       
    20  *    the documentation and/or other materials provided with the         
       
    21  *    distribution.                                                      
       
    22  *  * Neither the name Texas Instruments nor the names of its            
       
    23  *    contributors may be used to endorse or promote products derived    
       
    24  *    from this software without specific prior written permission.      
       
    25  *                                                                       
       
    26  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   
       
    27  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     
       
    28  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
       
    29  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  
       
    30  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
       
    31  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      
       
    32  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
       
    33  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
       
    34  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   
       
    35  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
       
    36  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    37  */
       
    38 
       
    39 
       
    40 /****************************************************************************
       
    41  *
       
    42  *   MODULE:  eventMbox_api.h : event Mail Box API
       
    43  *   PURPOSE: Notify EventMbox in case of an incoming event from the FW
       
    44  *
       
    45  ****************************************************************************/
       
    46 #ifndef _EVENT_MBOX_API_H
       
    47 #define _EVENT_MBOX_API_H
       
    48 
       
    49 
       
    50 #include "TWDriverInternal.h"
       
    51 #include "FwEvent.h"
       
    52 
       
    53 
       
    54 /*
       
    55  *  TEventMboxDataCb : This Call back is for EventMbox Client 
       
    56  *                     that expect an event with Data associated  
       
    57  *                     str:    The Data String
       
    58  *                     strLen : The Length of the Data
       
    59  */
       
    60 typedef void (*TEventMboxDataCb)(TI_HANDLE hCb, TI_CHAR* str, TI_UINT32 strLen);
       
    61 
       
    62 /*
       
    63  *  TEventMboxEvCb : This Call back is for EventMbox Client 
       
    64  *                   that expect an event without any Data
       
    65  */
       
    66 typedef void (*TEventMboxEvCb)(TI_HANDLE hCb);
       
    67 
       
    68 
       
    69 /*****************************************************************************
       
    70  **         API                                                            **
       
    71  *****************************************************************************/
       
    72 
       
    73 TI_HANDLE eventMbox_Create          (TI_HANDLE hOs);
       
    74 void      eventMbox_Destroy			(TI_HANDLE hEventMbox);
       
    75 void      eventMbox_Stop			(TI_HANDLE hEventMbox);
       
    76 void      eventMbox_Config			(TI_HANDLE hEventMbox,
       
    77 									 TI_HANDLE hTwif,
       
    78 									 TI_HANDLE hReport,
       
    79 									 TI_HANDLE hFwEvent,
       
    80 									 TI_HANDLE hCmdBld);
       
    81 TI_STATUS eventMbox_InitMboxAddr	(TI_HANDLE hEventMbox, fnotify_t fCb, TI_HANDLE hCb);
       
    82 void      eventMbox_InitComplete	(TI_HANDLE hEventMbox);
       
    83 TI_STATUS eventMbox_RegisterEvent	(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
       
    84 TI_STATUS eventMbox_ReplaceEvent	(TI_HANDLE hEventMbox,
       
    85                                      TI_UINT32   EvID, 
       
    86                                      void       *fNewCb, 
       
    87                                      TI_HANDLE   hNewCb,                                    
       
    88                                      void      **pPrevCb, 
       
    89                                      TI_HANDLE  *pPrevHndl);                                
       
    90 TI_STATUS eventMbox_UnMaskEvent		(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
       
    91 TI_STATUS eventMbox_MaskEvent		(TI_HANDLE hEventMbox, TI_UINT32 EvID, void *fCb, TI_HANDLE hCb);
       
    92 void      eventMbox_Handle		   	(TI_HANDLE hEventMbox, FwStatus_t *pFwStatus);
       
    93 #ifdef TI_DBG
       
    94 TI_STATUS eventMbox_Print           (TI_HANDLE hEventMbox);
       
    95 #endif
       
    96 
       
    97 #endif /* _EVENT_MBOX_API_H */