• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *
3  *  Copyright (C) 2014 Google, Inc.
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 _HCI_PACKET_FACTORY_H_
20 #define _HCI_PACKET_FACTORY_H_
21 
22 #include "stack/bt_types.h"
23 #include "device/event_mask.h"
24 
25 typedef struct {
26     BT_HDR *(*make_reset)(void);
27     BT_HDR *(*make_read_buffer_size)(void);
28     BT_HDR *(*make_set_c2h_flow_control)(uint8_t enable);
29     BT_HDR *(*make_set_adv_report_flow_control)(uint8_t enable, uint16_t num, uint16_t lost_threshold);
30     BT_HDR *(*make_host_buffer_size)(uint16_t acl_size, uint8_t sco_size, uint16_t acl_count, uint16_t sco_count);
31     BT_HDR *(*make_read_local_version_info)(void);
32     BT_HDR *(*make_read_bd_addr)(void);
33     BT_HDR *(*make_read_local_supported_commands)(void);
34     BT_HDR *(*make_read_local_supported_features)(void);
35     BT_HDR *(*make_read_local_extended_features)(uint8_t page_number);
36     BT_HDR *(*make_write_simple_pairing_mode)(uint8_t mode);
37     BT_HDR *(*make_write_secure_connections_host_support)(uint8_t mode);
38     BT_HDR *(*make_set_event_mask)(const bt_event_mask_t *event_mask);
39     BT_HDR *(*make_ble_write_host_support)(uint8_t supported_host, uint8_t simultaneous_host);
40     BT_HDR *(*make_ble_read_white_list_size)(void);
41     BT_HDR *(*make_ble_read_buffer_size)(void);
42     BT_HDR *(*make_ble_read_supported_states)(void);
43     BT_HDR *(*make_ble_read_local_supported_features)(void);
44     BT_HDR *(*make_ble_read_resolving_list_size)(void);
45 #if (BLE_50_FEATURE_SUPPORT == 1)
46     BT_HDR *(*make_read_max_adv_data_len)(void);
47 #endif // #if (BLE_50_FEATURE_SUPPORT == 1)
48     BT_HDR *(*make_ble_read_suggested_default_data_length)(void);
49     BT_HDR *(*make_ble_write_suggested_default_data_length)(uint16_t SuggestedMaxTxOctets, uint16_t SuggestedMaxTxTime);
50     BT_HDR *(*make_ble_set_event_mask)(const bt_event_mask_t *event_mask);
51     BT_HDR *(*make_write_sync_flow_control_enable)(uint8_t enable);
52     BT_HDR *(*make_write_default_erroneous_data_report)(uint8_t enable);
53 } hci_packet_factory_t;
54 
55 const hci_packet_factory_t *hci_packet_factory_get_interface(void);
56 
57 #endif /*_HCI_PACKET_FACTORY_H_*/
58