From 4a57432a4773d4a90d7f2311c60278f4432139f4 Mon Sep 17 00:00:00 2001 From: h2zero Date: Tue, 19 Nov 2024 11:51:32 -0700 Subject: [PATCH] Fix compilation errors in some situations. --- src/HIDTypes.h | 6 +++--- src/NimBLELocalValueAttribute.h | 5 +++++ src/NimBLEUUID.h | 5 +++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/HIDTypes.h b/src/HIDTypes.h index 8ee31da..4cdc919 100644 --- a/src/HIDTypes.h +++ b/src/HIDTypes.h @@ -25,9 +25,9 @@ #define HID_VERSION_1_11 (0x0111) /* HID Class */ -#define HID_CLASS (3) -#define HID_SUBCLASS_NONE (0) -#define HID_PROTOCOL_NONE (0) +#define BLE_HID_CLASS (3) +#define BLE_HID_SUBCLASS_NONE (0) +#define BLE_HID_PROTOCOL_NONE (0) /* Descriptors */ #define HID_DESCRIPTOR (33) diff --git a/src/NimBLELocalValueAttribute.h b/src/NimBLELocalValueAttribute.h index 756622f..749479f 100644 --- a/src/NimBLELocalValueAttribute.h +++ b/src/NimBLELocalValueAttribute.h @@ -17,6 +17,11 @@ # include "nimble/nimble/host/include/host/ble_hs.h" # endif +/**** FIX COMPILATION ****/ +# undef min +# undef max +/**************************/ + typedef enum { READ = BLE_GATT_CHR_F_READ, READ_ENC = BLE_GATT_CHR_F_READ_ENC, diff --git a/src/NimBLEUUID.h b/src/NimBLEUUID.h index 2863889..7863995 100644 --- a/src/NimBLEUUID.h +++ b/src/NimBLEUUID.h @@ -24,6 +24,11 @@ # include "nimble/nimble/host/include/host/ble_uuid.h" # endif +/**** FIX COMPILATION ****/ +# undef min +# undef max +/**************************/ + # include # include