From 0ae0792770f5e689b5f8d7323150238fb4183f4c Mon Sep 17 00:00:00 2001 From: ndeadly <24677491+ndeadly@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:01:14 +0200 Subject: [PATCH] btdrv: update gatt server event names to better reflect usage --- nx/include/switch/services/btdrv.h | 8 ++++---- nx/include/switch/services/btdrv_types.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nx/include/switch/services/btdrv.h b/nx/include/switch/services/btdrv.h index e29fdfc9f..b878eed17 100644 --- a/nx/include/switch/services/btdrv.h +++ b/nx/include/switch/services/btdrv.h @@ -439,21 +439,21 @@ typedef struct { u8 property; ///< Characteristic properties. Only set if attr_type is 1 \ref BtdrvGattCharacteristicProperty u8 is_primary; ///< Is a primary service or not u8 pad; ///< Padding - } server_add_characteristic; ///< ::BtdrvBleEventType_ServerAddCharacteristic + } server_add_attribute; ///< ::BtdrvBleEventType_ServerAddAttribute struct { u32 result; ///< 0 for success, non-zero for error. u16 conn_id; ///< Connection ID - u8 unk_x6; ///< Unknown. Always 1 + u8 operation; ///< Operation. 0 = Read, 1 = Write u8 pad; ///< Padding u16 service_id; ///< Service ID u16 attr_id; ///< Attribute ID u8 attr_type; ///< Attribute type \ref BtdrvGattAttributeType - u8 data[0x200]; ///< Data + u8 data[0x200]; ///< Data written during write operation u16 size; ///< Size of the above data u16 offset; ///< Offset u8 pad2[2]; ///< Padding - } server_write; ///< ::BtdrvBleEventType_ServerWrite + } server_attribute_operation; ///< ::BtdrvBleEventType_ServerAttributeOperation }; } BtdrvBleEventInfo; diff --git a/nx/include/switch/services/btdrv_types.h b/nx/include/switch/services/btdrv_types.h index bd1a99c51..29164ee66 100644 --- a/nx/include/switch/services/btdrv_types.h +++ b/nx/include/switch/services/btdrv_types.h @@ -137,8 +137,8 @@ typedef enum { BtdrvBleEventType_ClientCacheSave = 9, ///< GATT client cache save. BtdrvBleEventType_ClientCacheLoad = 10, ///< GATT client cache load. BtdrvBleEventType_ClientConfigureMtu = 11, ///< GATT client configure MTU. - BtdrvBleEventType_ServerAddCharacteristic = 12, ///< GATT server add characteristic. - BtdrvBleEventType_ServerWrite = 13, ///< GATT server write. + BtdrvBleEventType_ServerAddAttribute = 12, ///< GATT server add attribute. + BtdrvBleEventType_ServerAttributeOperation = 13, ///< GATT server attribute operation. } BtdrvBleEventType; /// GattAttributeType