Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ble): Add missing definition when using P4
  • Loading branch information
lucasssvaz committed Sep 10, 2025
commit 4e510deab7d353bf5f69c72a0beac44c0e41335a
7 changes: 1 addition & 6 deletions libraries/BLE/src/BLEDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,9 @@
#include <freertos/task.h>
#include <esp_err.h>
#include <nvs_flash.h>

#if SOC_BLE_SUPPORTED
#include <esp_bt.h>
#else
// For ESP32-P4 and other chips without native BLE support
// Define minimal types needed for interface compatibility
typedef int esp_power_level_t;
typedef int esp_ble_power_type_t;
#define ESP_BLE_PWR_TYPE_DEFAULT 0
#endif

#include <esp_err.h>
Expand Down
3 changes: 3 additions & 0 deletions libraries/BLE/src/BLEDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
***************************************************************************/

#include <map>

#if defined(SOC_BLE_SUPPORTED)
#include <esp_bt.h>
#else
Expand All @@ -30,7 +31,9 @@
typedef int esp_power_level_t;
typedef int esp_ble_power_type_t;
#define ESP_BLE_PWR_TYPE_DEFAULT 0
#define ESP_PWR_LVL_N12 0
#endif

#include "WString.h"
#include "BLEServer.h"
#include "BLEClient.h"
Expand Down
Loading