mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #10072 from nick-atmosphereiot/master
Adding variable length attributes to Maxim Featherpull/10275/head
commit
1c35b95d89
|
@ -146,6 +146,11 @@ ble_error_t MaximGattServer::addService_(GattService &service)
|
|||
currAtt->pLen = p_char->getValueAttribute().getLengthPtr();
|
||||
currAtt->maxLen = p_char->getValueAttribute().getMaxLength();
|
||||
currAtt->settings = ATTS_SET_WRITE_CBACK | ATTS_SET_READ_CBACK;
|
||||
|
||||
if(p_char->getValueAttribute().hasVariableLength()) {
|
||||
currAtt->settings |= ATTS_SET_VARIABLE_LEN;
|
||||
}
|
||||
|
||||
if (p_char->getValueAttribute().getUUID().shortOrLong() == UUID::UUID_TYPE_LONG) {
|
||||
currAtt->settings |= ATTS_SET_UUID_128;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue