• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Chipsea Technologies (Shenzhen) Corp., Ltd. All rights reserved.
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 _BT_TYPES_DEF_H_
16 #define _BT_TYPES_DEF_H_
17 #include <string.h>
18 #include "co_types_def.h"
19 #include "co_errors.h"
20 #include "wb_co_int.h"
21 
22 
23 #ifndef bool
24 #define bool BOOL
25 #endif
26 
27 /*---------------------------------------------------------------------------
28  * Status_BTDef type
29  */
30 typedef Co_Error Status_BTDef;
31 
32 #define BTDEF_NO_ERROR           CO_ERROR_ERROR_NONE
33 #define BTDEF_ERROR              CO_ERROR_ERROR
34 #define BTDEF_PENDING            CO_ERROR_PENDING
35 #define BTDEF_DISCONNECT         CO_ERROR_DISCONNECT
36 #define BTDEF_NOCON              CO_ERROR_NOCON
37 #define BTDEF_IS_USEING          CO_ERROR_IS_USEING
38 #define BTDEF_PLAY_NOT_DONE      CO_ERROR_PLAY_NOT_DONE
39 #define BTDEF_PLAY_DONE          CO_ERROR_PLAY_DONE
40 #define BTDEF_NO_PROGRESS        CO_ERROR_NO_PROGRESS
41 #define BTDEF_IS_CON             CO_ERROR_IS_CON
42 #define BTDEF_SEND_OUT           CO_ERROR_SEND_OUT
43 #define BTDEF_NOT_DONE           CO_ERROR_NOT_DONE
44 #define BTDEF_NO_RESOURCES       CO_ERROR_NO_RESOURCES
45 #define BTDEF_NOT_FOUND          CO_ERROR_NOT_FOUND
46 #define BTDEF_DEVICE_NOT_FOUND   CO_ERROR_DEVICE_NOT_FOUND
47 #define BTDEF_CON_ERROR          CO_ERROR_CON_ERROR
48 #define BTDEF_TIMER_TIMEOUT      CO_ERROR_TIMER_TIMEOUT
49 #define BTDEF_NO_CONN            CO_ERROR_NO_CONN
50 #define BTDEF_INVALID_PARAM      CO_ERROR_INVALID_PARAM
51 #define BTDEF_IS_GOING_ON        CO_ERROR_IS_GOING_ON
52 #define BTDEF_IS_LIMITED         CO_ERROR_IS_LIMITED
53 #define BTDEF_INVALID_TYPE       CO_ERROR_INVALID_TYPE
54 #define BTDEF_HCI_NOT_OPEN       CO_ERROR_HCI_NOT_OPEN
55 #define BTDEF_NOT_SUPPORTED      CO_ERROR_NOT_SUPPORTED
56 #define BTDEF_CONTINUE           CO_ERROR_CONTINUE
57 #define BTDEF_CANCELLED          CO_ERROR_CANCELLED
58 #define BTDEF_UNDEFINED          CO_ERROR_UNDEFINED
59 /* End of Status_BTDef */
60 
61 
62 #define BD_ADDR_SIZE    6
63 
64 typedef struct _BT_ADDR {
65     U8    addr[BD_ADDR_SIZE];
66 } BT_ADDR;
67 
68 #ifndef LISTS_DEFINED
69 #define LISTS_DEFINED
70 
71 typedef struct  _ListEntry
72 {
73     struct _ListEntry *Flink;
74     struct _ListEntry *Blink;
75 
76 } ListEntry;
77 #endif
78 
79 #endif /* _BT_TYPES_DEF_H_ */
80