Merge branch 'bugfix/fix_gatt_char_perm_key_size' into 'master'

Bluedroid: fix encrypt keysize of GATT characteristic permission

Closes BT-2992

See merge request espressif/esp-idf!21250
This commit is contained in:
Zhi Wei Jian
2022-12-12 16:23:59 +08:00
8 changed files with 5 additions and 31 deletions

View File

@@ -277,6 +277,7 @@ typedef enum {
#define ESP_GATT_PERM_WRITE_SIGNED_MITM (1 << 8) /* bit 8 - 0x0100 */ /* relate to BTA_GATT_PERM_WRITE_SIGNED_MITM in bta/bta_gatt_api.h */
#define ESP_GATT_PERM_READ_AUTHORIZATION (1 << 9) /* bit 9 - 0x0200 */
#define ESP_GATT_PERM_WRITE_AUTHORIZATION (1 << 10) /* bit 10 - 0x0400 */
#define ESP_GATT_PERM_ENCRYPT_KEY_SIZE(keysize) (((keysize - 6) & 0xF) << 12) /* bit 12:15 - 0xF000 */
typedef uint16_t esp_gatt_perm_t;
/* relate to BTA_GATT_CHAR_PROP_BIT_xxx in bta/bta_gatt_api.h */