COMMON IO-BLE v1.0.0
Hardware abstraction layer for Bluetooth
 
Loading...
Searching...
No Matches
bt_hal_manager_adapter_classic.h
Go to the documentation of this file.
1/*
2 * FreeRTOS BLE HAL V5.1.0
3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * SPDX-License-Identifier: MIT
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy of
8 * this software and associated documentation files (the "Software"), to deal in
9 * the Software without restriction, including without limitation the rights to
10 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11 * the Software, and to permit persons to whom the Software is furnished to do so,
12 * subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in all
15 * copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * http://aws.amazon.com/freertos
25 * http://www.FreeRTOS.org
26 */
27
37#ifndef _BT_HAL_MANAGER_ADAPTER_CLASSIC_
38#define _BT_HAL_MANAGER_ADAPTER_CLASSIC_
39
40#include "bt_hal_manager.h"
41
46typedef enum
47{
52
53
58typedef enum
59{
63
64
69typedef enum
70{
74
79typedef enum
80{
84
85
90typedef struct
91{
93 uint16_t usChannel;
94 char * cName;
96
101typedef struct
102{
103 uint32_t ulVvendor;
104 uint32_t ulProduct;
106
111typedef struct
112{
113 uint32_t ulVendor;
114 uint32_t ulProduct;
115 uint32_t ulUuid;
117
122typedef enum
123{
127
132typedef enum
133{
140
147
154
161
168
175
182 /* Properties unique to adapter */
183
190 /* Properties unique to manufacturer and device */
191
198 /* Properties unique to remove */
199
206
213
220
228
233typedef struct
234{
236 size_t xLen;
237 void * pvVal;
239
251 uint32_t ulNumProperties,
252 BTClassicProperty_t * pxProperties );
253
266 BTBdaddr_t * pxBdAddr,
267 uint32_t ulNumProperties,
268 BTClassicProperty_t * pxProperties );
269
280typedef void (* BTDeviceFoundCallback_t)( uint32_t ulNumProperties,
281 BTClassicProperty_t * pxProperties );
282
292
302typedef void (* BTaclStateChangedCallback_t)( BTStatus_t xStatus,
303 BTBdaddr_t * pxRemoteBdAddr,
304 BTaclState_t xState );
305
310typedef struct
311{
318
319
325typedef struct
326{
333 BTStatus_t ( * pxInit )( BTClassicCallbacks_t * pxCallbacks );
334
341 BTStatus_t ( * pxCleanup )();
342
351 BTStatus_t ( * pxGetClassicDeviceProperty )( BTClassicPropertyType_t xType );
352
359 BTStatus_t ( * pxSetClassicDeviceProperty )( const BTClassicProperty_t * pxProperty );
360
369 BTStatus_t ( * pxGetAllRemoteClassicDeviceProperties )( BTBdaddr_t * pxRemote_addr );
370
379 BTStatus_t ( * pxGetRemoteClassicDeviceProperty )( BTBdaddr_t * pxRemote_addr,
381
387 BTStatus_t ( * pxSetRemoteClassicDeviceProperty )( BTBdaddr_t * pxRemote_addr,
388 const BTClassicProperty_t * pxProperty );
389
395 BTStatus_t ( * pxGetRemoteServiceRecord )( BTBdaddr_t * pxRemote_addr,
396 BTUuid_t * pxUuid );
397
402 BTStatus_t ( * pxGetRemoteService )( BTBdaddr_t * pxRemote_addr );
403
408 BTStatus_t ( * pxStartDiscovery )();
409
414 BTStatus_t ( * pxStopDiscovery )();
415
421 const void * ( *ppvGetProfileInterface )( BTProfile_t xProfile );
423
424
429
430#endif /* _BT_HAL_MANAGER_ADAPTER_CLASSIC_ */
BT provides the interfaces to control the Bluetooth device. ,local device control and device discover...
const BTClassicInterface_t * BT_GetClassicAdapter()
void(* BTClassicDevicePropertiesCallback_t)(BTStatus_t xStatus, uint32_t ulNumProperties, BTClassicProperty_t *pxProperties)
Callback invoked in response to BTClassicInterface_t::pxGetClassicDeviceProperty and BTClassicInterfa...
Definition: bt_hal_manager_adapter_classic.h:250
void(* BTClassicRemoteDevicePropertiesCallback_t)(BTStatus_t xStatus, BTBdaddr_t *pxBdAddr, uint32_t ulNumProperties, BTClassicProperty_t *pxProperties)
Callback invoked in response to BTClassicInterface_t::pxGetRemoteClassicDeviceProperty and BTClassicI...
Definition: bt_hal_manager_adapter_classic.h:265
void(* BTDeviceFoundCallback_t)(uint32_t ulNumProperties, BTClassicProperty_t *pxProperties)
Callback invoked in response to device discovery If EIR data is not present, then BD_NAME and RSSI sh...
Definition: bt_hal_manager_adapter_classic.h:280
void(* BTaclStateChangedCallback_t)(BTStatus_t xStatus, BTBdaddr_t *pxRemoteBdAddr, BTaclState_t xState)
Callback invoked in response to ACL connection state change.
Definition: bt_hal_manager_adapter_classic.h:302
void(* BTDiscoveryStateChangedCallback_t)(BTDiscoveryState_t xState)
Callback invoked in response to BTClassicInterface_t::pxStartDiscovery and BTClassicInterface_t::pxSt...
Definition: bt_hal_manager_adapter_classic.h:291
BTaclState_t
Bluetooth ACL connection state.
Definition: bt_hal_manager_adapter_classic.h:80
BTStatus_t
Bluetooth Error Status .
Definition: bt_hal_manager_types.h:111
BTScanType_t
Bluetooth Scan types.
Definition: bt_hal_manager_adapter_classic.h:123
BTDiscoveryState_t
Bluetooth Adapter Discovery state.
Definition: bt_hal_manager_adapter_classic.h:70
BTProfile_t
Bluetooth Profile .
Definition: bt_hal_manager_types.h:133
BTScanParam_t
Bluetooth scan parameters.
Definition: bt_hal_manager_adapter_classic.h:59
BTScanMode_t
Bluetooth Adapter Visibility Modes.
Definition: bt_hal_manager_adapter_classic.h:47
BTClassicPropertyType_t
Classic Device Property Types.
Definition: bt_hal_manager_adapter_classic.h:133
@ eBTaclStateDisconnected
Definition: bt_hal_manager_adapter_classic.h:82
@ eBTaclStateConnected
Definition: bt_hal_manager_adapter_classic.h:81
@ eBTScanTypeStandard
Definition: bt_hal_manager_adapter_classic.h:124
@ eBTScanTypeInterlaced
Definition: bt_hal_manager_adapter_classic.h:125
@ eBTDiscoveryStopped
Definition: bt_hal_manager_adapter_classic.h:71
@ eBTDiscoveryStarted
Definition: bt_hal_manager_adapter_classic.h:72
@ eBTPageScanInterval220ms
Definition: bt_hal_manager_adapter_classic.h:60
@ eBTPageScanInterval1280ms
Definition: bt_hal_manager_adapter_classic.h:61
@ eBTScanModeNone
Definition: bt_hal_manager_adapter_classic.h:48
@ eBTScanModeConnectableDiscoverable
Definition: bt_hal_manager_adapter_classic.h:50
@ eBTScanModeConnectable
Definition: bt_hal_manager_adapter_classic.h:49
@ eBTPropertyAdapterScanMode
Definition: bt_hal_manager_adapter_classic.h:189
@ eBTPropertyAdapterScanParam
Definition: bt_hal_manager_adapter_classic.h:205
@ eBTPropertyClassOfDevice
Definition: bt_hal_manager_adapter_classic.h:167
@ eBTPropertyUUIDS
Definition: bt_hal_manager_adapter_classic.h:160
@ eBTPropertyAdapterDiscoveryTimeout
Definition: bt_hal_manager_adapter_classic.h:181
@ eBTPropertyEIRManfInfo
Definition: bt_hal_manager_adapter_classic.h:197
@ eBTPropertyScanType
Definition: bt_hal_manager_adapter_classic.h:219
@ eBTPropertyGadgetEIRManfInfo
Definition: bt_hal_manager_adapter_classic.h:226
@ eBTPropertyBdname
Definition: bt_hal_manager_adapter_classic.h:139
@ eBTPropertyTypeOfDevice
Definition: bt_hal_manager_adapter_classic.h:153
@ eBTPropertyBdaddr
Definition: bt_hal_manager_adapter_classic.h:146
@ eBTPropertyServiceRecord
Definition: bt_hal_manager_adapter_classic.h:174
@ eBTPropertyConnectability
Definition: bt_hal_manager_adapter_classic.h:212
BT/BLE address.
Definition: bt_hal_manager_types.h:77
Bluetooth DM callback structure.
Definition: bt_hal_manager_adapter_classic.h:311
BTDeviceFoundCallback_t pxDeviceFound_cb
Definition: bt_hal_manager_adapter_classic.h:314
BTClassicDevicePropertiesCallback_t pxDevProperties_cb
Definition: bt_hal_manager_adapter_classic.h:312
BTClassicRemoteDevicePropertiesCallback_t pxRemoteDevProperties_cb
Definition: bt_hal_manager_adapter_classic.h:313
BTaclStateChangedCallback_t pxAclStateChanged_cb
Definition: bt_hal_manager_adapter_classic.h:316
BTDiscoveryStateChangedCallback_t pxDiscoveryStateChanged_cb
Definition: bt_hal_manager_adapter_classic.h:315
Represents the standard SAL BT Classic device management interface.
Definition: bt_hal_manager_adapter_classic.h:326
Classic Device Property.
Definition: bt_hal_manager_adapter_classic.h:234
size_t xLen
Definition: bt_hal_manager_adapter_classic.h:236
BTClassicPropertyType_t xType
Definition: bt_hal_manager_adapter_classic.h:235
void * pvVal
Definition: bt_hal_manager_adapter_classic.h:237
manufacturer information EIR data
Definition: bt_hal_manager_adapter_classic.h:102
uint32_t ulProduct
Definition: bt_hal_manager_adapter_classic.h:104
uint32_t ulVvendor
Definition: bt_hal_manager_adapter_classic.h:103
gadget manufacturer information EIR data
Definition: bt_hal_manager_adapter_classic.h:112
uint32_t ulVendor
Definition: bt_hal_manager_adapter_classic.h:113
uint32_t ulUuid
Definition: bt_hal_manager_adapter_classic.h:115
uint32_t ulProduct
Definition: bt_hal_manager_adapter_classic.h:114
Bluetooth SDP service record.
Definition: bt_hal_manager_adapter_classic.h:91
uint16_t usChannel
Definition: bt_hal_manager_adapter_classic.h:93
BTUuid_t xUuid
Definition: bt_hal_manager_adapter_classic.h:92
char * cName
Definition: bt_hal_manager_adapter_classic.h:94
UUID.
Definition: bt_hal_manager_types.h:96