Home | History | Annotate | Download | only in sys
      1 /******************************************************************************
      2  *
      3  *  Copyright (C) 2010-2012 Broadcom Corporation
      4  *
      5  *  Licensed under the Apache License, Version 2.0 (the "License");
      6  *  you may not use this file except in compliance with the License.
      7  *  You may obtain a copy of the License at:
      8  *
      9  *  http://www.apache.org/licenses/LICENSE-2.0
     10  *
     11  *  Unless required by applicable law or agreed to in writing, software
     12  *  distributed under the License is distributed on an "AS IS" BASIS,
     13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14  *  See the License for the specific language governing permissions and
     15  *  limitations under the License.
     16  *
     17  ******************************************************************************/
     18 
     19 /******************************************************************************
     20  *
     21  *  This is the implementation file for BTA system call-in functions.
     22  *
     23  ******************************************************************************/
     24 
     25 #include "bta_sys.h"
     26 #include "bta_sys_ci.h"
     27 
     28 
     29 /*******************************************************************************
     30 **
     31 ** Function         bta_sys_hw_ci_enabled
     32 **
     33 ** Description      This function must be called in response to function
     34 **                  bta_sys_hw_enable_co(), when HW is indeed enabled
     35 **
     36 **
     37 ** Returns          void
     38 **
     39 *******************************************************************************/
     40   void bta_sys_hw_ci_enabled(tBTA_SYS_HW_MODULE module )
     41 
     42 {
     43     tBTA_SYS_HW_MSG *p_msg;
     44 
     45     if ((p_msg = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
     46     {
     47         p_msg->hdr.event = BTA_SYS_EVT_ENABLED_EVT;
     48         p_msg->hw_module = module;
     49 
     50         bta_sys_sendmsg(p_msg);
     51     }
     52 }
     53 
     54 /*******************************************************************************
     55 **
     56 ** Function         bta_sys_hw_ci_disabled
     57 **
     58 ** Description      This function must be called in response to function
     59 **                  bta_sys_hw_disable_co() when HW is really OFF
     60 **
     61 **
     62 ** Returns          void
     63 **
     64 *******************************************************************************/
     65 void bta_sys_hw_ci_disabled( tBTA_SYS_HW_MODULE module  )
     66 {
     67     tBTA_SYS_HW_MSG *p_msg;
     68 
     69     if ((p_msg = (tBTA_SYS_HW_MSG *) GKI_getbuf(sizeof(tBTA_SYS_HW_MSG))) != NULL)
     70     {
     71         p_msg->hdr.event = BTA_SYS_EVT_DISABLED_EVT;
     72         p_msg->hw_module = module;
     73 
     74         bta_sys_sendmsg(p_msg);
     75     }
     76 }
     77 
     78