mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-05 09:40:00 +00:00
notify/indicate implies client characteristic configuration
This commit is contained in:
parent
8b5b2d2f0d
commit
c360258ca8
@ -64,8 +64,7 @@ property_flags = {
|
|||||||
'ENCRYPTION_KEY_SIZE_14': 0xd000,
|
'ENCRYPTION_KEY_SIZE_14': 0xd000,
|
||||||
'ENCRYPTION_KEY_SIZE_15': 0xe000,
|
'ENCRYPTION_KEY_SIZE_15': 0xe000,
|
||||||
'ENCRYPTION_KEY_SIZE_16': 0xf000,
|
'ENCRYPTION_KEY_SIZE_16': 0xf000,
|
||||||
# only used by gatt compiler
|
# only used by gatt compiler >= 0xffff
|
||||||
'CLIENT_CONFIGURATION': 0x10000,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
services = dict()
|
services = dict()
|
||||||
@ -145,6 +144,9 @@ def is_string(text):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def add_client_characteristic_configuration(properties):
|
||||||
|
return properties & (property_flags['NOTIFY'] | property_flags['INDICATE'])
|
||||||
|
|
||||||
def parseService(fout, parts, service_type):
|
def parseService(fout, parts, service_type):
|
||||||
global handle
|
global handle
|
||||||
global total_size
|
global total_size
|
||||||
@ -271,7 +273,7 @@ def parseCharacteristic(fout, parts):
|
|||||||
fout.write("\n")
|
fout.write("\n")
|
||||||
handle = handle + 1
|
handle = handle + 1
|
||||||
|
|
||||||
if (properties & property_flags['CLIENT_CONFIGURATION']) == 0:
|
if add_client_characteristic_configuration(properties) == 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
size = 2 + 2 + 2 + 2 + 2
|
size = 2 + 2 + 2 + 2 + 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user