FreeRTOS: BLE
BLE
Return to main page ↑
bt_hal_avsrc_profile.h
1 /*
2  * FreeRTOS BLE HAL V5.0.0
3  * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  *
22  * http://aws.amazon.com/freertos
23  * http://www.FreeRTOS.org
24  */
25 
37 #ifndef _BT_HAL_AVSRC_PROFILE_H
38 #define _BT_HAL_AVSRC_PROFILE_H
39 
40 #include <stddef.h>
41 #include <stdint.h>
42 #include "bt_hal_manager_types.h"
43 
47 typedef enum
48 {
54 
58 typedef enum
59 {
64 
74  BTBdaddr_t * pxBdAddr );
75 
83  BTBdaddr_t * pxBdAddr );
84 
85 typedef struct
86 {
87  size_t xSize;
88  BTAvsrcConnectionStateCallback_t xConnStateCback;
89  BTAvsrcAudioStateCallback_t xAudioStateCback;
91 
93 typedef struct
94 {
96  size_t xSize;
97 
103  BTStatus_t ( * pxAvsrcInit )( BTAvsrcCallbacks_t * pxCallbacks );
104 
110  BTStatus_t ( * pxAvsrcCleanup )();
111 
117  BTStatus_t ( * pxAvsrcConnect )( BTBdaddr_t * pxRemote_addr );
118 
125  BTStatus_t ( * pxAvsrcDisconnect )( BTBdaddr_t * pxRemote_addr );
127 
128 const BTAvsrcInterface_t * BT_GetAvsrcInterface();
129 
130 #endif /* _BT_HAL_AVSRC_PROFILE_H */
131 
eBTAvsrcAudioStateRemoteSuspend
@ eBTAvsrcAudioStateRemoteSuspend
Definition: bt_hal_avsrc_profile.h:60
BTAvsrcAudioStateCallback_t
void(* BTAvsrcAudioStateCallback_t)(BTAvAudioState_t xState, BTBdaddr_t *pxBdAddr)
Callback invoked in to notify AV Audio state change.
Definition: bt_hal_avsrc_profile.h:82
BTAvsrcInterface_t::xSize
size_t xSize
Definition: bt_hal_avsrc_profile.h:96
eBTAvsrcAudioStateStarted
@ eBTAvsrcAudioStateStarted
Definition: bt_hal_avsrc_profile.h:62
eBTAvsrcConnectionStateDisconnecting
@ eBTAvsrcConnectionStateDisconnecting
Definition: bt_hal_avsrc_profile.h:52
eBTAvsrcConnectionStateConnecting
@ eBTAvsrcConnectionStateConnecting
Definition: bt_hal_avsrc_profile.h:50
BTStatus_t
BTStatus_t
Bluetooth Error Status .
Definition: bt_hal_manager_types.h:98
eBTAvsrcConnectionStateConnected
@ eBTAvsrcConnectionStateConnected
Definition: bt_hal_avsrc_profile.h:51
BTAvConnectionState_t
BTAvConnectionState_t
Bluetooth AV connection states.
Definition: bt_hal_avsrc_profile.h:48
eBTAvsrcConnectionStateDisconnected
@ eBTAvsrcConnectionStateDisconnected
Definition: bt_hal_avsrc_profile.h:49
bt_hal_manager_types.h
BTAvAudioState_t
BTAvAudioState_t
Bluetooth AV data path states.
Definition: bt_hal_avsrc_profile.h:59
BTAvsrcInterface_t
Definition: bt_hal_avsrc_profile.h:94
eBTAvsrcAudioStateStopped
@ eBTAvsrcAudioStateStopped
Definition: bt_hal_avsrc_profile.h:61
BTAvsrcCallbacks_t
Definition: bt_hal_avsrc_profile.h:86
BTBdaddr_t
BT/BLE address.
Definition: bt_hal_manager_types.h:67
BTAvsrcConnectionStateCallback_t
void(* BTAvsrcConnectionStateCallback_t)(BTAvConnectionState_t xState, BTBdaddr_t *pxBdAddr)
Callback invoked in to notify AV connection state change.
Definition: bt_hal_avsrc_profile.h:73