add characteristic isFixedLen()
This commit is contained in:
2 files changed
+6
No files matched your search
@@ -127,6 +127,11 @@ uint16_t BLECharacteristic::getMaxLen(void)
|
||||
return _max_len;
|
||||
}
|
||||
|
||||
bool BLECharacteristic::isFixedLen(void)
|
||||
{
|
||||
return _attr_meta.vlen == 0;
|
||||
}
|
||||
|
||||
void BLECharacteristic::setFixedLen(uint16_t fixed_len)
|
||||
{
|
||||
if ( fixed_len )
|
||||
|
||||
@@ -101,6 +101,7 @@ class BLECharacteristic
|
||||
void setBuffer(void* buf, uint16_t bufsize);
|
||||
|
||||
uint16_t getMaxLen(void);
|
||||
bool isFixedLen(void);
|
||||
|
||||
/*------------- Descriptors -------------*/
|
||||
void setUserDescriptor(const char* descriptor); // aka user descriptor
|
||||
|
||||
Reference in new issue
Block a user