mirror of https://github.com/ARMmbed/mbed-os.git
Adding variable length attributes to Maxim Feather
parent
401a3c8551
commit
e08b200eef
|
@ -146,6 +146,12 @@ 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