From bea2ac19f61e089dd52236961929f0ca1097f2cc Mon Sep 17 00:00:00 2001 From: ndeadly <24677491+ndeadly@users.noreply.github.com> Date: Wed, 14 Oct 2026 12:52:36 +0200 Subject: [PATCH] btdrv: add enum describing GATT operation type found in BLE client_notify events --- nx/include/switch/services/btdrv.h | 2 +- nx/include/switch/services/btdrv_types.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/nx/include/switch/services/btdrv.h b/nx/include/switch/services/btdrv.h index 6dc104858a..32880599e4 100644 --- a/nx/include/switch/services/btdrv.h +++ b/nx/include/switch/services/btdrv.h @@ -398,7 +398,7 @@ typedef struct { struct { u32 result; ///< 0 for success, non-zero for error. u32 conn_id; ///< Connection ID - u8 type; ///< Notification type. 4 = Notification, 5 = Indication. + u8 op_type; ///< GATT Operation Type \ref BtdrvGattOperationType u8 pad[3]; ///< Padding BtdrvGattAttributeUuid serv_uuid; ///< GATT Service UUID \ref BtdrvGattAttributeUuid BtdrvGattAttributeUuid char_uuid; ///< GATT Characteristic UUID \ref BtdrvGattAttributeUuid diff --git a/nx/include/switch/services/btdrv_types.h b/nx/include/switch/services/btdrv_types.h index 17495d8abe..e16b998237 100644 --- a/nx/include/switch/services/btdrv_types.h +++ b/nx/include/switch/services/btdrv_types.h @@ -193,6 +193,16 @@ typedef enum { BtdrvGattAuthReqType_SignedMitm = 4, } BtdrvGattAuthReqType; +/// GattOperationType +typedef enum { + BtdrvGattOperationType_CharacteristicRead = 0, + BtdrvGattOperationType_CharacteristicWrite = 1, + BtdrvGattOperationType_DescriptorRead = 2, + BtdrvGattOperationType_DescriptorWrite = 3, + BtdrvGattOperationType_Notification = 4, + BtdrvGattOperationType_Indication = 5, +} BtdrvGattOperationType; + /// BtdrvBleAdBit typedef enum { BtdrvBleAdBit_DeviceName = BIT(0),