mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 20:50:46 +01:00
NimBLECharacteristic: add setValue(uint8_t single_byte)
This commit is contained in:
parent
0712f606f1
commit
c25e48872f
2 changed files with 5 additions and 0 deletions
|
@ -478,6 +478,10 @@ void NimBLECharacteristic::setValue(const std::string &value) {
|
|||
setValue((uint8_t*)(value.data()), value.length());
|
||||
} // setValue
|
||||
|
||||
void NimBLECharacteristic::setValue(uint8_t data8) {
|
||||
setValue(&data8, 1);
|
||||
} // setValue
|
||||
|
||||
void NimBLECharacteristic::setValue(uint16_t& data16) {
|
||||
uint8_t temp[2];
|
||||
temp[0] = data16;
|
||||
|
|
|
@ -80,6 +80,7 @@ public:
|
|||
void setCallbacks(NimBLECharacteristicCallbacks* pCallbacks);
|
||||
void setValue(const uint8_t* data, size_t size);
|
||||
void setValue(const std::string &value);
|
||||
void setValue(uint8_t data8);
|
||||
void setValue(uint16_t& data16);
|
||||
void setValue(uint32_t& data32);
|
||||
void setValue(int& data32);
|
||||
|
|
Loading…
Reference in a new issue