add BLECharacteristic::setTempMemory() to explicitly exclude chars from managing table
This commit is contained in:
1 parent
a6861aee31
commit
5766aa3d10
5 files changed
+26
-4
No files matched your search
@@ -167,6 +167,7 @@ err_t BLEDfu::start(void)
|
||||
|
||||
// No need to keep packet & revision characteristics
|
||||
BLECharacteristic chr_packet(UUID128_CHR_DFU_PACKET);
|
||||
chr_packet.setTempMemory();
|
||||
chr_packet.setProperties(CHR_PROPS_WRITE_WO_RESP);
|
||||
chr_packet.setMaxLen(20);
|
||||
VERIFY_STATUS( chr_packet.start() );
|
||||
@@ -177,6 +178,7 @@ err_t BLEDfu::start(void)
|
||||
VERIFY_STATUS( _chr_control.start() );
|
||||
|
||||
BLECharacteristic chr_revision(UUID128_CHR_DFU_REVISON);
|
||||
chr_packet.setTempMemory();
|
||||
chr_revision.setProperties(CHR_PROPS_READ);
|
||||
chr_revision.setFixedLen(2);
|
||||
VERIFY_STATUS( chr_revision.start());
|
||||
|
||||
@@ -97,6 +97,7 @@ err_t BLEDis::start(void)
|
||||
if ( _strarr[i] != NULL )
|
||||
{
|
||||
BLECharacteristic chars(UUID16_CHR_MODEL_NUMBER_STRING+i);
|
||||
chars.setTempMemory();
|
||||
|
||||
chars.setProperties(CHR_PROPS_READ);
|
||||
chars.setFixedLen(strlen(_strarr[i]));
|
||||
|
||||
@@ -315,6 +315,7 @@ err_t BLEHidGeneric::start(void)
|
||||
|
||||
// Report Map (HID Report Descriptor)
|
||||
BLECharacteristic report_map(UUID16_CHR_REPORT_MAP);
|
||||
report_map.setTempMemory();
|
||||
report_map.setProperties(CHR_PROPS_READ);
|
||||
report_map.setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
report_map.setFixedLen(_report_map_len);
|
||||
@@ -350,6 +351,7 @@ err_t BLEHidGeneric::start(void)
|
||||
|
||||
// HID Info
|
||||
BLECharacteristic hid_info(UUID16_CHR_HID_INFORMATION);
|
||||
hid_info.setTempMemory();
|
||||
hid_info.setProperties(CHR_PROPS_READ);
|
||||
hid_info.setPermission(SECMODE_ENC_NO_MITM, SECMODE_NO_ACCESS);
|
||||
hid_info.setFixedLen(sizeof(_hid_info));
|
||||
|
||||
Reference in new issue
Block a user