RDK-B
bt_hal.h
Go to the documentation of this file.
1
/*
2
* If not stated otherwise in this file or this component's LICENSE file the
3
* following copyright and licenses apply:
4
*
5
* Copyright 2016 RDK Management
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
#ifndef __BT_HAL_H__
21
#define __BT_HAL_H__
22
23
/**
24
* @defgroup bt_hal Bluetooth HAL
25
*
26
* @defgroup BLUETOOTH_HAL_TYPES Bluetooth HAL Data Types
27
* @ingroup bt_hal
28
*
29
* @defgroup BLUETOOTH_HAL_APIS Bluetooth HAL APIs
30
* @ingroup bt_hal
31
*
32
**/
33
34
35
/**
36
* @addtogroup BLUETOOTH_HAL_TYPES
37
* @{
38
*/
39
40
/**********************************************************************
41
CONSTANT DEFINITIONS
42
**********************************************************************/
43
44
#ifndef CHAR
45
#define CHAR char
46
#endif
47
48
#ifndef UCHAR
49
#define UCHAR unsigned char
50
#endif
51
52
#ifndef BOOLEAN
53
#define BOOLEAN unsigned char
54
#endif
55
56
#ifndef USHORT
57
#define USHORT unsigned short
58
#endif
59
60
#ifndef UINT8
61
#define UINT8 unsigned char
62
#endif
63
64
#ifndef INT
65
#define INT int
66
#endif
67
68
#ifndef UINT
69
#define UINT unsigned int
70
#endif
71
72
#ifndef LONG
73
#define LONG long
74
#endif
75
76
#ifndef ULONG
77
#define ULONG unsigned long
78
#endif
79
80
#ifndef TRUE
81
#define TRUE 1
82
#endif
83
84
#ifndef FALSE
85
#define FALSE 0
86
#endif
87
88
#ifndef ENABLE
89
#define ENABLE 1
90
#endif
91
92
#ifndef RETURN_OK
93
#define RETURN_OK 0
94
#endif
95
96
#ifndef RETURN_ERR
97
#define RETURN_ERR -1
98
#endif
99
100
typedef
enum
101
{
102
BLE_ENABLE
= 1,
103
BLE_DISABLE
,
104
BLE_LAST
105
}
BLE_Status_e
;
106
107
/**
108
* @}
109
*/
110
111
/**
112
* @addtogroup BLUETOOTH_HAL_APIS
113
* @{
114
*/
115
116
/**********************************************************************************
117
*
118
* BLE Subsystem level function prototypes
119
*
120
**********************************************************************************/
121
122
123
/* ble_Enable : */
124
/**
125
* @description Enable/disable BLE radio.
126
*
127
* @param BLE_Status_e status New BLE radio status
128
*
129
* @return The status of the operation.
130
* @retval RETURN_OK if successful.
131
* @retval RETURN_ERR if any error is detected
132
*
133
* @execution Synchronous.
134
* @sideeffect None.
135
*
136
* @note This function must not suspend and must not invoke any blocking system
137
* calls.
138
*
139
*/
140
INT
ble_Enable
(
BLE_Status_e
status);
141
142
/* ble_Status : */
143
/**
144
* @description Returns BLE status.
145
*
146
* @param BLE_Status_e * status Pointer to status, to be returned
147
*
148
* @return The status of the operation.
149
* @retval RETURN_OK if successful.
150
* @retval RETURN_ERR if any error is detected
151
*
152
* @execution Synchronous.
153
* @sideeffect None.
154
*
155
* @note This function must not suspend and must not invoke any blocking system
156
* calls.
157
*
158
*/
159
INT
ble_GetStatus
(
BLE_Status_e
*status);
160
161
#endif
162
163
/**
164
* @}
165
*/
166
ble_Enable
int ble_Enable(BLE_Status_e status)
BLE_LAST
@ BLE_LAST
Definition:
bt_hal.h:104
BLE_Status_e
BLE_Status_e
Definition:
bt_hal.h:100
INT
#define INT
Definition:
bt_hal.h:65
BLE_ENABLE
@ BLE_ENABLE
Definition:
bt_hal.h:102
BLE_DISABLE
@ BLE_DISABLE
Definition:
bt_hal.h:103
ble_GetStatus
int ble_GetStatus(BLE_Status_e *status)
components
halinterface
bt_hal.h
Generated on Thu Feb 9 2023 06:33:16 for RDK-B by
1.8.17