Updated BLERemoteCharacteristic to exposre esp_gatt_auth_req_t parame… (#3531)

* Updated BLERemoteCharacteristic to exposre esp_gatt_auth_req_t parameter for readValue and writeValue.

* Updated BLERemoteCharacteristic/Descriptor to expose a setAuth method to allow tweaking the authentication request type for that remotecharacteristic/descriptor without the need to add auth on each read/write.
This commit is contained in:
lj
2020-01-20 08:40:13 -05:00
committed by Me No Dev
parent 2f13a960ac
commit c2b37d95e0
4 changed files with 25 additions and 4 deletions

View File

@ -34,6 +34,7 @@ public:
void writeValue(uint8_t* data, size_t length, bool response = false);
void writeValue(std::string newValue, bool response = false);
void writeValue(uint8_t newValue, bool response = false);
void setAuth(esp_gatt_auth_req_t auth);
private:
@ -48,6 +49,7 @@ private:
std::string m_value; // Last received value of the descriptor.
BLERemoteCharacteristic* m_pRemoteCharacteristic; // Reference to the Remote characteristic of which this descriptor is associated.
FreeRTOS::Semaphore m_semaphoreReadDescrEvt = FreeRTOS::Semaphore("ReadDescrEvt");
esp_gatt_auth_req_t m_auth;
};