Skip to content

Commit 1c35b95

Browse files
author
Cruz Monrreal
authored
Merge pull request #10072 from nick-atmosphereiot/master
Adding variable length attributes to Maxim Feather
2 parents 5401cb6 + 44c5c7e commit 1c35b95

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

features/FEATURE_BLE/targets/TARGET_Maxim/MaximGattServer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ ble_error_t MaximGattServer::addService_(GattService &service)
146146
currAtt->pLen = p_char->getValueAttribute().getLengthPtr();
147147
currAtt->maxLen = p_char->getValueAttribute().getMaxLength();
148148
currAtt->settings = ATTS_SET_WRITE_CBACK | ATTS_SET_READ_CBACK;
149+
150+
if(p_char->getValueAttribute().hasVariableLength()) {
151+
currAtt->settings |= ATTS_SET_VARIABLE_LEN;
152+
}
153+
149154
if (p_char->getValueAttribute().getUUID().shortOrLong() == UUID::UUID_TYPE_LONG) {
150155
currAtt->settings |= ATTS_SET_UUID_128;
151156
}

0 commit comments

Comments
 (0)