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