mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-05 06:46:31 +02:00
Set ESP-IDF to 3.2 (#2662)
* Set IDF to v3.2 * Remove BLE submodule * Add BLE lib source * Update Camera example to support OV3660
This commit is contained in:
39
libraries/BLE/src/BLEValue.h
Normal file
39
libraries/BLE/src/BLEValue.h
Normal file
@ -0,0 +1,39 @@
|
||||
/*
|
||||
* BLEValue.h
|
||||
*
|
||||
* Created on: Jul 17, 2017
|
||||
* Author: kolban
|
||||
*/
|
||||
|
||||
#ifndef COMPONENTS_CPP_UTILS_BLEVALUE_H_
|
||||
#define COMPONENTS_CPP_UTILS_BLEVALUE_H_
|
||||
#include "sdkconfig.h"
|
||||
#if defined(CONFIG_BT_ENABLED)
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @brief The model of a %BLE value.
|
||||
*/
|
||||
class BLEValue {
|
||||
public:
|
||||
BLEValue();
|
||||
void addPart(std::string part);
|
||||
void addPart(uint8_t* pData, size_t length);
|
||||
void cancel();
|
||||
void commit();
|
||||
uint8_t* getData();
|
||||
size_t getLength();
|
||||
uint16_t getReadOffset();
|
||||
std::string getValue();
|
||||
void setReadOffset(uint16_t readOffset);
|
||||
void setValue(std::string value);
|
||||
void setValue(uint8_t* pData, size_t length);
|
||||
|
||||
private:
|
||||
std::string m_accumulation;
|
||||
uint16_t m_readOffset;
|
||||
std::string m_value;
|
||||
|
||||
};
|
||||
#endif // CONFIG_BT_ENABLED
|
||||
#endif /* COMPONENTS_CPP_UTILS_BLEVALUE_H_ */
|
Reference in New Issue
Block a user