High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Diff: blecharacteristic.cpp
- Revision:
- 2:ffc5216bd2cc
- Parent:
- 1:fd3ec64b2345
- Child:
- 3:46de446e82ed
--- a/blecharacteristic.cpp Wed Dec 04 07:20:24 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -#include <stdio.h> -#include <string.h> - -#include "blecharacteristic.h" - -/**************************************************************************/ -/*! - @brief Creates a new BLECharacteristic using the specified 16-bit - UUID, value length, and properties - - @note The UUID value must be unique in the service and is normally >1 - - @param[in] id - The 16-bit UUID to use for this characteristic - @param[in] minLen - The min length in bytes of this characteristic's value - @param[in] maxLen - The max length in bytes of this characteristic's value - @param[in] props - The 8-bit bit field containing the characteristic's - properties - - @section EXAMPLE - - @code - - // UUID = 0x2A19, Min length 2, Max len = 2, Properties = write - BLECharacteristic c = BLECharacteristic( 0x2A19, 2, 2, 0x08 ); - - @endcode -*/ -/**************************************************************************/ -BLECharacteristic::BLECharacteristic(uint16_t id, uint16_t minLen, uint16_t maxLen, uint8_t props) -{ - uuid = id; - memcpy(&properties, &props, 1); - lenMin = minLen; - lenMax = maxLen; -} - -/**************************************************************************/ -/*! - Destructor -*/ -/**************************************************************************/ -BLECharacteristic::~BLECharacteristic(void) -{ -}