OVMS3-idf/examples/bluetooth/ble_hid_device_demo
Tian Hao ee787085f9 component/bt : decrease memory consumption by conn number
1. BLE only with 9(max) connection will decrease 3K DRAM
2. BR/EDR only with 7(max) connection will decrease 16K DRAM
3. Any of BLE or BR/EDR connection number decrease will also decrease DRAM consumption
4. Decrease one BLE connection will save about 1KB DRAM
5. Decrease one BR/EDR ACL connection will save about 1.2KB DRAM
6. Decrease one BR/EDR SCO/eSCO will save 2KB DRAM.
7. fix some definition and kconfig
8. remove 1.2k of vhci tx cache and make .bss & .data to heap about 1.4K
9. modify BT Reserved Memory size and modify example to support new bt kconfig
2018-08-14 02:29:17 +00:00
..
main nvs_flash: Version compatibility check for nvs storage 2018-08-05 00:00:56 +00:00
Makefile example/hid: Added the BLE hid device profile. 2018-04-19 11:44:51 +08:00
README.md example/hid: Added the readme file. 2018-04-20 09:20:44 -04:00
sdkconfig.defaults component/bt : decrease memory consumption by conn number 2018-08-14 02:29:17 +00:00

ESP-IDF BLE HID device demo

This example Implemented BLE HID device profile related functions, in which the HID device has 4 Reports (1 is mouse, 2 is keyboard and LED, 3 is Consumer Devices, 4 is Vendor devices). Users can choose different reports according to their own application scenarios. BLE HID profile inheritance and USB HID class.

ble_hidd_demo_main.c

This file is the demo to show how to used the HID(you can used it to connected to the smart phone act as the consumer device then can used the button to volume++ or volume-- etc., or connected to the Windows 10 PC act as a keyboard or mouse)

hidd_le_prf_int.h

This header file includes some HID profile related definitions.

esp_hidd_prf_api.h & esp_hidd_prf_api.c

These files contains the the api of the HID profile

When you used the HID profile, you just need to added the esp_hidd_prf_api.h includes file and send the HID data used the function defined in the esp_hidd_prf_api.c file.

hid_dev.h & hid_dev.c

These file define the HID spec related definitions

hid_device_le_prf.c

This file is the HID profile definition file, it include the main function of the HID profile. It mainly includes how to create HID service. If you send and receive HID data and convert the data to keyboard keys, the mouse and consumer values are forwarded to the application.