mirror of
https://github.com/T-vK/ESP32-BLE-Keyboard.git
synced 2026-03-13 08:30:59 +08:00
Fixed USE_NIMBLE
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "BleKeyboard.h"
|
||||
|
||||
#if defined(USE_NIMBLE)
|
||||
#include <NimBLEDevice.h>
|
||||
#include <NimBLEServer.h>
|
||||
@@ -14,7 +16,6 @@
|
||||
#include <driver/adc.h>
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#include "BleKeyboard.h"
|
||||
|
||||
#if defined(CONFIG_ARDUHAL_ESP_LOG)
|
||||
#include "esp32-hal-log.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// uncomment the following line to use NimBLE library
|
||||
//#define USE_NIMBLE
|
||||
|
||||
#ifndef ESP32_BLE_KEYBOARD_H
|
||||
#define ESP32_BLE_KEYBOARD_H
|
||||
#include "sdkconfig.h"
|
||||
|
||||
12
README.md
12
README.md
@@ -137,15 +137,13 @@ Flash: [==== ] 44.2% (used 579158 bytes from 1310720 bytes)
|
||||
| `ESP.getFreeHeap()` | 143.572 | 260.764 | **+ 117.192** |
|
||||
| `ESP.getSketchSize()` | 994.224 | 579.264 | **- 414.960** |
|
||||
|
||||
### How to activate NimBLE mode?
|
||||
## How to activate NimBLE mode?
|
||||
|
||||
ArduinoIDE: Before including the library, insert the line `#define USE_NIMBLE`
|
||||
```C++
|
||||
#define USE_NIMBLE
|
||||
#include <BleKeyboard.h>
|
||||
```
|
||||
### ArduinoIDE:
|
||||
Edit BleKeyboard.h and remove and uncomment the first line `#define USE_NIMBLE`
|
||||
|
||||
PlatformIO: Change your `platformio.ini` to the following settings
|
||||
### PlatformIO:
|
||||
Change your `platformio.ini` to the following settings
|
||||
```ini
|
||||
lib_deps =
|
||||
NimBLE-Arduino
|
||||
|
||||
Reference in New Issue
Block a user