1 // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #ifndef __BTC_BT_MAIN_H__ 16 #define __BTC_BT_MAIN_H__ 17 18 #include "osi/future.h" 19 #include "stack/bt_types.h" 20 #include "bta/bta_api.h" 21 #include "btc/btc_main.h" 22 #include "btc/btc_task.h" 23 24 typedef enum { 25 BTC_MAIN_ACT_INIT = 0, 26 BTC_MAIN_ACT_DEINIT, 27 BTC_MAIN_ACT_ENABLE, 28 BTC_MAIN_ACT_DISABLE, 29 } btc_main_act_t; 30 31 typedef enum { 32 BTC_MAIN_INIT_FUTURE = 0, 33 BTC_MAIN_DEINIT_FUTURE, 34 BTC_MAIN_ENABLE_FUTURE, 35 BTC_MAIN_DISABLE_FUTURE, 36 BTC_MAIN_FUTURE_NUM, 37 } btc_main_future_type_t; 38 39 future_t **btc_main_get_future_p(btc_main_future_type_t type); 40 41 #if 0 42 typedef union { 43 struct btc_main_init_args { 44 future_t *future; 45 } init; 46 struct btc_main_deinit_args { 47 future_t *future; 48 } deinit; 49 struct btc_main_init_args { 50 future_t *future; 51 } enable; 52 struct btc_main_init_args { 53 future_t *future; 54 } disable; 55 } btc_main_args_t; 56 57 bt_status_t btc_enable_bluetooth(future_t *future); 58 void btc_disable_bluetooth(future_t *future); 59 bt_status_t btc_init_bluetooth(future_t *future); 60 void btc_deinit_bluetooth(future_t *future); 61 #endif 62 63 void btc_main_call_handler(btc_msg_t *msg); 64 #endif /* __BTC_BT_MAIN_H__ */ 65