]> granicus.if.org Git - esp-idf/blob - components/bt/bluedroid/osi/include/thread.h
Merge branch 'feature/btdm_bluedroid' into feature/btdm_a2dp
[esp-idf] / components / bt / bluedroid / osi / include / thread.h
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 __THREAD_H__
16 #define __THREAD_H__
17
18 #include "freertos/xtensa_api.h"
19 #include "freertos/FreeRTOSConfig.h"
20 #include "freertos/FreeRTOS.h"
21 #include "freertos/queue.h"
22 #include "freertos/task.h"
23
24 #include "bt_defs.h"
25
26 #define portBASE_TYPE int
27
28 struct bt_task_evt {
29     uint32_t    sig;    //task sig
30     void       *par;    //point to task param
31     void       *cb;     //point to function cb
32     void       *arg;    //point to function arg
33 };
34 typedef struct bt_task_evt BtTaskEvt_t;
35
36 typedef bt_status_t (* BtTaskCb_t)(void *arg);
37
38 enum {
39     SIG_PRF_START_UP = 0xfc,
40     SIG_PRF_WORK = 0xfd,
41     SIG_BTU_START_UP = 0xfe,
42     SIG_BTU_WORK = 0xff,
43     // SIG_BTIF_WORK = 0xff
44 };
45
46 void btu_task_post(uint32_t sig);
47 void hci_host_task_post(void);
48 void hci_hal_h4_task_post(void);
49 void hci_drv_task_post(void);
50 void bt_alarm_task_post(void);
51
52
53 #endif /* __THREAD_H__ */