esp_hid_host sample
Select one of the symbols to view example projects that use it.
Symbol previews are coming soon...
Outline
#define _ESP_HID_GAP_H_
#define HIDH_IDLE_MODE
#define HIDH_BLE_MODE
#define HIDH_BT_MODE
#define HIDH_BTDM_MODE
#define HID_HOST_MODE
#define HID_HOST_MODE
#define HID_HOST_MODE
#define HID_HOST_MODE
#define HID_HOST_MODE
#include "esp_err.h"
#include "esp_log.h"
#include "esp_bt.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
#include "esp_gap_bt_api.h"
#include "esp_hid_common.h"
#include "esp_gattc_api.h"
#include "esp_gatt_defs.h"
#include "esp_gap_ble_api.h"
#include "nimble/ble.h"
esp_hidh_scan_result_s
next
bda
name
rssi
usage
transport
<anonymous union>
<anonymous struct>
cod
uuid
bt
<anonymous struct>
addr_type
appearance
ble
esp_hid_gap_init(uint8_t);
esp_hid_scan(uint32_t, size_t *, esp_hid_scan_result_t **);
esp_hid_scan_results_free(esp_hid_scan_result_t *);
esp_hid_ble_gap_adv_init(uint16_t, const char *);
esp_hid_ble_gap_adv_start();
print_uuid(esp_bt_uuid_t *);
ble_addr_type_str(esp_ble_addr_type_t);
Files
loading...
SourceVu
ESP-IDF Framework and Examples
esp_hid_host sample
main/esp_hid_gap.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
/* ... */
#ifndef
_ESP_HID_GAP_H_
#define
_ESP_HID_GAP_H_
#define
HIDH_IDLE_MODE
0x00
#define
HIDH_BLE_MODE
0x01
#define
HIDH_BT_MODE
0x02
#define
HIDH_BTDM_MODE
0x03
5 defines
#if
CONFIG_BT_HID_HOST_ENABLED
#if
CONFIG_BT_BLE_ENABLED
#define
HID_HOST_MODE
HIDH_BTDM_MODE
#else
#define
HID_HOST_MODE
HIDH_BT_MODE
#endif
/* ... */
#elif
CONFIG_BT_BLE_ENABLED
#define
HID_HOST_MODE
HIDH_BLE_MODE
#elif
CONFIG_BT_NIMBLE_ENABLED
#define
HID_HOST_MODE
HIDH_BLE_MODE
#else
#define
HID_HOST_MODE
HIDH_IDLE_MODE
#endif
#include
"
esp_err.h"
#include
"
esp_log.h"
#include
"
esp_bt.h"
#if
!
CONFIG_BT_NIMBLE_ENABLED
#include
"
esp_bt_defs.h"
#include
"
esp_bt_main.h"
#include
"
esp_gap_bt_api.h"
/* ... */
#endif
#include
"
esp_hid_common.h"
#if
CONFIG_BT_BLE_ENABLED
#include
"
esp_gattc_api.h"
#include
"
esp_gatt_defs.h"
#include
"
esp_gap_ble_api.h"
/* ... */
#endif
#if
CONFIG_BT_NIMBLE_ENABLED
#include
"
nimble
/
ble.h"
#endif
#ifdef
__cplusplus
extern
"C"
{
#endif
typedef
struct
esp_hidh_scan_result_s
{
struct
esp_hidh_scan_result_s
*
next
;
#if
CONFIG_BT_NIMBLE_ENABLED
uint8_t
bda
[
6
]
;
#else
esp_bd_addr_t
bda
;
#endif
const
char
*
name
;
int8_t
rssi
;
esp_hid_usage_t
usage
;
esp_hid_transport_t
transport
;
//BT, BLE or USB
union
{
#if
!
CONFIG_BT_NIMBLE_ENABLED
struct
{
esp_bt_cod_t
cod
;
esp_bt_uuid_t
uuid
;
}
{ ... }
bt
;
struct
{
esp_ble_addr_type_t
addr_type
;
uint16_t
appearance
;
}
{ ... }
ble
;
/* ... */
#else
struct
{
uint8_t
addr_type
;
uint16_t
appearance
;
}
{...}
ble
;
/* ... */
#endif
}
{ ... }
;
}
{ ... }
esp_hid_scan_result_t
;
esp_err_t
esp_hid_gap_init
(
uint8_t
mode
)
;
esp_err_t
esp_hid_scan
(
uint32_t
seconds
,
size_t
*
num_results
,
esp_hid_scan_result_t
*
*
results
)
;
void
esp_hid_scan_results_free
(
esp_hid_scan_result_t
*
results
)
;
esp_err_t
esp_hid_ble_gap_adv_init
(
uint16_t
appearance
,
const
char
*
device_name
)
;
esp_err_t
esp_hid_ble_gap_adv_start
(
void
)
;
#if
!
CONFIG_BT_NIMBLE_ENABLED
void
print_uuid
(
esp_bt_uuid_t
*
uuid
)
;
const
char
*
ble_addr_type_str
(
esp_ble_addr_type_t
ble_addr_type
)
;
/* ... */
#endif
#ifdef
__cplusplus
}
{...}
#endif
/* ... */
#endif
/* _ESP_HIDH_GAP_H_ */
Details
Show:
from
Types:
Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.
print_uuid()
esp_hid_gap_init()
esp_hid_ble_gap_adv_start()
ble_addr_type_str()
esp_hid_scan()
esp_hid_scan_results_free()
esp_hid_ble_gap_adv_init()
esp_err_t
esp_bd_addr_t
CONFIG_BT_BLE_ENABLED
esp_hidh_scan_result_s
print_uuid()::uuid
CONFIG_BT_HID_HOST_ENABLED
esp_hidh_scan_result_s::name
esp_hidh_scan_result_s::next
esp_hid_scan_results_free()::results
esp_hidh_scan_result_s::bda
esp_hidh_scan_result_s::transport
esp_hid_gap_init()::mode
esp_hidh_scan_result_s::rssi
esp_hidh_scan_result_s::
::bt
esp_hid_scan()::seconds
esp_hid_scan()::results
ble_addr_type_str()::ble_addr_type
esp_hidh_scan_result_s::usage
esp_hidh_scan_result_s::
::ble
esp_hid_scan()::num_results
esp_hid_ble_gap_adv_init()::appearance
esp_hid_ble_gap_adv_init()::device_name
esp_hidh_scan_result_s::
::
::cod
esp_hidh_scan_result_s::
::
::uuid
HID_HOST_MODE
esp_hidh_scan_result_s::
::
::addr_type
esp_hidh_scan_result_s::
::
::appearance
_ESP_HID_GAP_H_
HIDH_IDLE_MODE
HIDH_BTDM_MODE
HIDH_BLE_MODE
HIDH_BT_MODE
esp_hid_usage_t
esp_hid_transport_t
esp_bt_cod_t
esp_bt_uuid_t
esp_ble_addr_type_t
esp_hid_scan_result_t