Fix compilation errors in some situations.

This commit is contained in:
h2zero 2024-11-19 11:51:32 -07:00
parent 5f2730de02
commit 4dbffea9e2
3 changed files with 13 additions and 3 deletions

View file

@ -25,9 +25,9 @@
#define HID_VERSION_1_11 (0x0111) #define HID_VERSION_1_11 (0x0111)
/* HID Class */ /* HID Class */
#define HID_CLASS (3) #define BLE_HID_CLASS (3)
#define HID_SUBCLASS_NONE (0) #define BLE_HID_SUBCLASS_NONE (0)
#define HID_PROTOCOL_NONE (0) #define BLE_HID_PROTOCOL_NONE (0)
/* Descriptors */ /* Descriptors */
#define HID_DESCRIPTOR (33) #define HID_DESCRIPTOR (33)

View file

@ -17,6 +17,11 @@
# include "nimble/nimble/host/include/host/ble_hs.h" # include "nimble/nimble/host/include/host/ble_hs.h"
# endif # endif
/**** FIX COMPILATION ****/
# undef min
# undef max
/**************************/
typedef enum { typedef enum {
READ = BLE_GATT_CHR_F_READ, READ = BLE_GATT_CHR_F_READ,
READ_ENC = BLE_GATT_CHR_F_READ_ENC, READ_ENC = BLE_GATT_CHR_F_READ_ENC,

View file

@ -24,6 +24,11 @@
# include "nimble/nimble/host/include/host/ble_uuid.h" # include "nimble/nimble/host/include/host/ble_uuid.h"
# endif # endif
/**** FIX COMPILATION ****/
# undef min
# undef max
/**************************/
# include <string> # include <string>
# include <cstring> # include <cstring>