minor improvements to documentation.

This commit is contained in:
Rohit Grover 2014-12-09 13:14:45 +00:00
parent c7eb83db09
commit ba5fb7fb36
3 changed files with 17 additions and 7 deletions

View file

@ -81,11 +81,10 @@ public:
}
/**
* @brief
* @return
* @brief get the handle for the value attribute of the control characteristic.
*/
uint16_t getControlHandle(void) {
return controlPoint.getValueAttribute().getHandle();
uint16_t getControlHandle(void) const {
return controlPoint.getValueHandle();
}
/**
@ -93,8 +92,8 @@ public:
* handover control to the bootloader; but first the application is given a
* chance to clean up.
*
* @param[in]
*
* @param[in] params
* Information about the characterisitc being updated.
*/
virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {

View file

@ -32,7 +32,7 @@ public:
* @enum Sensor Location
* @brief Location of sensor on the body
*/
enum {
enum SensorLocation_t {
LOCATION_ARMPIT = 1, /*!< armpit */
LOCATION_BODY, /*!< body */
LOCATION_EAR, /*!< ear */
@ -80,6 +80,15 @@ public:
}
}
/**
* @brief Update the location.
* @param loc
* new location value.
*/
void updateLocation(SensorLocation_t loc) {
ble.updateCharacteristicValue(tempLocation.getValueHandle(), reinterpret_cast<uint8_t *>(&loc), sizeof(uint8_t));
}
private:
/* Private internal representation for the bytes used to work with the vaulue of the heart-rate characteristic. */
struct TemperatureValueBytes {

View file

@ -115,6 +115,8 @@ public:
* This callback allows the HeartRateService to receive updates to the
* controlPoint Characteristic.
*
* @param[in] params
* Information about the characterisitc being updated.
*/
virtual void onDataWritten(const GattCharacteristicWriteCBParams *params) {
if (params->charHandle == controlPoint.getValueAttribute().getHandle()) {