mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-03 10:20:18 +00:00
att_db_util: fix permission encoding
This commit is contained in:
parent
15f22304d2
commit
8bea14f288
@ -181,13 +181,13 @@ static uint16_t att_db_util_encode_permissions(uint16_t properties, uint8_t read
|
|||||||
if (read_permission & 1){
|
if (read_permission & 1){
|
||||||
flags |= ATT_PROPERTY_READ_PERMISSION_BIT_0;
|
flags |= ATT_PROPERTY_READ_PERMISSION_BIT_0;
|
||||||
}
|
}
|
||||||
if (read_permission & 1){
|
if (read_permission & 2){
|
||||||
flags |= ATT_PROPERTY_READ_PERMISSION_BIT_1;
|
flags |= ATT_PROPERTY_READ_PERMISSION_BIT_1;
|
||||||
}
|
}
|
||||||
if (write_permission & 1){
|
if (write_permission & 1){
|
||||||
flags |= ATT_PROPERTY_WRITE_PERMISSION_BIT_0;
|
flags |= ATT_PROPERTY_WRITE_PERMISSION_BIT_0;
|
||||||
}
|
}
|
||||||
if (write_permission & 1){
|
if (write_permission & 2){
|
||||||
flags |= ATT_PROPERTY_WRITE_PERMISSION_BIT_1;
|
flags |= ATT_PROPERTY_WRITE_PERMISSION_BIT_1;
|
||||||
}
|
}
|
||||||
return flags;
|
return flags;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user