RSeries astromech firmware
bt_types.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1999-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 #ifndef BT_TYPES_H
20 #define BT_TYPES_H
21 
22 #include <stdint.h>
23 #include <stdbool.h>
24 
25 typedef uint8_t UINT8;
26 typedef uint16_t UINT16;
27 typedef uint32_t UINT32;
28 typedef uint64_t UINT64;
29 
30 typedef int8_t INT8;
31 typedef int16_t INT16;
32 typedef int32_t INT32;
33 typedef bool BOOLEAN;
34 
35 
36 /* Define the header of each buffer used in the Bluetooth stack.
37 */
39 typedef struct {
40  uint16_t event;
41  uint16_t len;
42  uint16_t offset;
43  uint16_t layer_specific;
44  uint8_t data[];
45 } BT_HDR;
46 
47 
48 #define BT_PSM_HIDC 0x0011
49 #define BT_PSM_HIDI 0x0013
50 
52 typedef struct {
53  UINT8 qos_flags; /* TBD */
54  UINT8 service_type; /* see below */
55  UINT32 token_rate; /* bytes/second */
56  UINT32 token_bucket_size; /* bytes */
57  UINT32 peak_bandwidth; /* bytes/second */
58  UINT32 latency; /* microseconds */
59  UINT32 delay_variation; /* microseconds */
60 } FLOW_SPEC;
61 
62 
63 /* bd addr length and type */
64 #ifndef BD_ADDR_LEN
65 #define BD_ADDR_LEN 6
66 typedef uint8_t BD_ADDR[BD_ADDR_LEN];
67 #endif
68 
69 #endif
INT16
int16_t INT16
Definition: bt_types.h:31
BD_ADDR
uint8_t BD_ADDR[BD_ADDR_LEN]
Definition: bt_types.h:66
UINT8
uint8_t UINT8
Definition: bt_types.h:25
INT32
int32_t INT32
Definition: bt_types.h:32
INT8
int8_t INT8
Definition: bt_types.h:30
BOOLEAN
bool BOOLEAN
Definition: bt_types.h:33
UINT32
uint32_t UINT32
Definition: bt_types.h:27
BD_ADDR_LEN
#define BD_ADDR_LEN
Definition: bt_types.h:65
UINT64
uint64_t UINT64
Definition: bt_types.h:28
UINT16
uint16_t UINT16
Definition: bt_types.h:26