Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 21:5442f7c70e71, committed 2014-01-07
- Comitter:
- ktownsend
- Date:
- Tue Jan 07 10:50:31 2014 +0000
- Parent:
- 20:c6ceaa206674
- Child:
- 22:260313bcf4d0
- Commit message:
- Improved some doxygen comment
Changed in this revision
--- a/GapAdvertisingData.h Thu Dec 19 14:02:49 2013 +0000
+++ b/GapAdvertisingData.h Tue Jan 07 10:50:31 2014 +0000
@@ -71,22 +71,22 @@
/**********************************************************************/
enum DataType
{
- FLAGS = 0x01,
- INCOMPLETE_LIST_16BIT_SERVICE_IDS = 0x02,
- COMPLETE_LIST_16BIT_SERVICE_IDS = 0x03,
- INCOMPLETE_LIST_32BIT_SERVICE_IDS = 0x04,
- COMPLETE_LIST_32BIT_SERVICE_IDS = 0x05,
- INCOMPLETE_LIST_128BIT_SERVICE_IDS = 0x06,
- COMPLETE_LIST_128BIT_SERVICE_IDS = 0x07,
- SHORTENED_LOCAL_NAME = 0x08,
- COMPLETE_LOCAL_NAME = 0x09,
- TX_POWER_LEVEL = 0x0A,
- DEVICE_ID = 0x10,
- SLAVE_CONNECTION_INTERVAL_RANGE = 0x12,
- SERVICE_DATA = 0x16,
- APPEARANCE = 0x19,
- ADVERTISING_INTERVAL = 0x1A,
- MANUFACTURER_SPECIFIC_DATA = 0xFF
+ FLAGS = 0x01, /**< \ref Flags */
+ INCOMPLETE_LIST_16BIT_SERVICE_IDS = 0x02, /**< Incomplete list of 16-bit Service IDs */
+ COMPLETE_LIST_16BIT_SERVICE_IDS = 0x03, /**< Complete list of 16-bit Service IDs */
+ INCOMPLETE_LIST_32BIT_SERVICE_IDS = 0x04, /**< Incomplete list of 32-bit Service IDs (not relevant for Bluetooth 4.0) */
+ COMPLETE_LIST_32BIT_SERVICE_IDS = 0x05, /**< Complete list of 32-bit Service IDs (not relevant for Bluetooth 4.0) */
+ INCOMPLETE_LIST_128BIT_SERVICE_IDS = 0x06, /**< Incomplete list of 128-bit Service IDs */
+ COMPLETE_LIST_128BIT_SERVICE_IDS = 0x07, /**< Complete list of 128-bit Service IDs */
+ SHORTENED_LOCAL_NAME = 0x08, /**< Shortened Local Name */
+ COMPLETE_LOCAL_NAME = 0x09, /**< Complete Local Name */
+ TX_POWER_LEVEL = 0x0A, /**< TX Power Level (in dBm) */
+ DEVICE_ID = 0x10, /**< Device ID */
+ SLAVE_CONNECTION_INTERVAL_RANGE = 0x12, /**< Slave Connection Interval Range */
+ SERVICE_DATA = 0x16, /**< Service Data */
+ APPEARANCE = 0x19, /**< \ref Appearance */
+ ADVERTISING_INTERVAL = 0x1A, /**< Advertising Interval */
+ MANUFACTURER_SPECIFIC_DATA = 0xFF /**< Manufacturer Specific Data */
};
/**********************************************************************/
@@ -125,54 +125,54 @@
/**********************************************************************/
enum Appearance
{
- UNKNOWN = 0,
- GENERIC_PHONE = 64,
- GENERIC_COMPUTER = 128,
- GENERIC_WATCH = 192,
- WATCH_SPORTS_WATCH = 193,
- GENERIC_CLOCK = 256,
- GENERIC_DISPLAY = 320,
- GENERIC_REMOTE_CONTROL = 384,
- GENERIC_EYE_GLASSES = 448,
- GENERIC_TAG = 512,
- GENERIC_KEYRING = 576,
- GENERIC_MEDIA_PLAYER = 640,
- GENERIC_BARCODE_SCANNER = 704,
- GENERIC_THERMOMETER = 768,
- THERMOMETER_EAR = 769,
- GENERIC_HEART_RATE_SENSOR = 832,
- HEART_RATE_SENSOR_HEART_RATE_BELT = 833,
- GENERIC_BLOOD_PRESSURE = 896,
- BLOOD_PRESSURE_ARM = 897,
- BLOOD_PRESSURE_WRIST = 898,
- HUMAN_INTERFACE_DEVICE_HID = 960,
- KEYBOARD = 961,
- MOUSE = 962,
- JOYSTICK = 963,
- GAMEPAD = 964,
- DIGITIZER_TABLET = 965,
- CARD_READER = 966,
- DIGITAL_PEN = 967,
- BARCODE_SCANNER = 968,
- GENERIC_GLUCOSE_METER = 1024,
- GENERIC_RUNNING_WALKING_SENSOR = 1088,
- RUNNING_WALKING_SENSOR_IN_SHOE = 1089,
- RUNNING_WALKING_SENSOR_ON_SHOE = 1090,
- RUNNING_WALKING_SENSOR_ON_HIP = 1091,
- GENERIC_CYCLING = 1152,
- CYCLING_CYCLING_COMPUTER = 1153,
- CYCLING_SPEED_SENSOR = 1154,
- CYCLING_CADENCE_SENSOR = 1155,
- CYCLING_POWER_SENSOR = 1156,
- CYCLING_SPEED_AND_CADENCE_SENSOR = 1157,
- PULSE_OXIMETER_GENERIC = 3136,
- PULSE_OXIMETER_FINGERTIP = 3137,
- PULSE_OXIMETER_WRIST_WORN = 3138,
- OUTDOOR_GENERIC = 5184,
- OUTDOOR_LOCATION_DISPLAY_DEVICE = 5185,
- OUTDOOR_LOCATION_AND_NAVIGATION_DISPLAY_DEVICE = 5186,
- OUTDOOR_LOCATION_POD = 5187,
- OUTDOOR_LOCATION_AND_NAVIGATION_POD = 5188
+ UNKNOWN = 0, /**< Unknown of unspecified appearance type */
+ GENERIC_PHONE = 64, /**< Generic Phone */
+ GENERIC_COMPUTER = 128, /**< Generic Computer */
+ GENERIC_WATCH = 192, /**< Generic Watch */
+ WATCH_SPORTS_WATCH = 193, /**< Sports Watch */
+ GENERIC_CLOCK = 256, /**< Generic Clock */
+ GENERIC_DISPLAY = 320, /**< Generic Display */
+ GENERIC_REMOTE_CONTROL = 384, /**< Generic Remote Control */
+ GENERIC_EYE_GLASSES = 448, /**< Generic Eye Glasses */
+ GENERIC_TAG = 512, /**< Generic Tag */
+ GENERIC_KEYRING = 576, /**< Generic Keyring */
+ GENERIC_MEDIA_PLAYER = 640, /**< Generic Media Player */
+ GENERIC_BARCODE_SCANNER = 704, /**< Generic Barcode Scanner */
+ GENERIC_THERMOMETER = 768, /**< Generic Thermometer */
+ THERMOMETER_EAR = 769, /**< Ear Thermometer */
+ GENERIC_HEART_RATE_SENSOR = 832, /**< Generic Heart Rate Sensor */
+ HEART_RATE_SENSOR_HEART_RATE_BELT = 833, /**< Belt Heart Rate Sensor */
+ GENERIC_BLOOD_PRESSURE = 896, /**< Generic Blood Pressure */
+ BLOOD_PRESSURE_ARM = 897, /**< Arm Blood Pressure */
+ BLOOD_PRESSURE_WRIST = 898, /**< Wrist Blood Pressure */
+ HUMAN_INTERFACE_DEVICE_HID = 960, /**< Human Interface Device (HID) */
+ KEYBOARD = 961, /**< Keyboard */
+ MOUSE = 962, /**< Mouse */
+ JOYSTICK = 963, /**< Joystick */
+ GAMEPAD = 964, /**< Gamepad */
+ DIGITIZER_TABLET = 965, /**< Digitizer Tablet */
+ CARD_READER = 966, /**< Card Read */
+ DIGITAL_PEN = 967, /**< Digital Pen */
+ BARCODE_SCANNER = 968, /**< Barcode Scanner */
+ GENERIC_GLUCOSE_METER = 1024, /**< Generic Glucose Meter */
+ GENERIC_RUNNING_WALKING_SENSOR = 1088, /**< Generic Running/Walking Sensor */
+ RUNNING_WALKING_SENSOR_IN_SHOE = 1089, /**< In Shoe Running/Walking Sensor */
+ RUNNING_WALKING_SENSOR_ON_SHOE = 1090, /**< On Shoe Running/Walking Sensor */
+ RUNNING_WALKING_SENSOR_ON_HIP = 1091, /**< On Hip Running/Walking Sensor */
+ GENERIC_CYCLING = 1152, /**< Generic Cycling */
+ CYCLING_CYCLING_COMPUTER = 1153, /**< Cycling Computer */
+ CYCLING_SPEED_SENSOR = 1154, /**< Cycling Speed Senspr */
+ CYCLING_CADENCE_SENSOR = 1155, /**< Cycling Cadence Sensor */
+ CYCLING_POWER_SENSOR = 1156, /**< Cycling Power Sensor */
+ CYCLING_SPEED_AND_CADENCE_SENSOR = 1157, /**< Cycling Speed and Cadence Sensor */
+ PULSE_OXIMETER_GENERIC = 3136, /**< Generic Pulse Oximeter */
+ PULSE_OXIMETER_FINGERTIP = 3137, /**< Fingertip Pulse Oximeter */
+ PULSE_OXIMETER_WRIST_WORN = 3138, /**< Wrist Worn Pulse Oximeter */
+ OUTDOOR_GENERIC = 5184, /**< Generic Outdoor */
+ OUTDOOR_LOCATION_DISPLAY_DEVICE = 5185, /**< Outdoor Location Display Device */
+ OUTDOOR_LOCATION_AND_NAVIGATION_DISPLAY_DEVICE = 5186, /**< Outdoor Location and Navigation Display Device */
+ OUTDOOR_LOCATION_POD = 5187, /**< Outdoor Location Pod */
+ OUTDOOR_LOCATION_AND_NAVIGATION_POD = 5188 /**< Outdoor Location and Navigation Pod */
};
GapAdvertisingData(void);
--- a/GapAdvertisingParams.h Thu Dec 19 14:02:49 2013 +0000
+++ b/GapAdvertisingParams.h Tue Jan 07 10:50:31 2014 +0000
@@ -34,8 +34,19 @@
class GapAdvertisingParams
{
public:
- /* See Bluetooth Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1 */
- /* See Bluetooth Core Specification 4.0 (Vol. 3), Part C, Section 9.3 */
+ /**************************************************************************/
+ /*!
+ \brief
+ Encapsulates the peripheral advertising modes, which determine how
+ the device appears to other central devices in hearing range
+
+ \par
+ See the following for more information on advertising types:
+
+ \li \c Bluetooth Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1
+ \li \c Bluetooth Core Specification 4.0 (Vol. 3), Part C, Section 9.3
+ */
+ /**************************************************************************/
enum AdvertisingType
{
ADV_CONNECTABLE_UNDIRECTED, /**< Vol 3, Part C, Section 9.3.4 and Vol 6, Part B, Section 2.3.1.1 */
--- a/blecommon.h Thu Dec 19 14:02:49 2013 +0000
+++ b/blecommon.h Tue Jan 07 10:50:31 2014 +0000
@@ -7,130 +7,149 @@
#include <stdint.h>
+/**************************************************************************/
+/*!
+ \brief Error codes for the BLE API
+*/
+/**************************************************************************/
typedef enum ble_error_e
{
- BLE_ERROR_NONE = 0,
- BLE_ERROR_BUFFER_OVERFLOW = 1,
- BLE_ERROR_NOT_IMPLEMENTED = 2, /* Requested a feature that isn't yet implement or isn't supported by the target HW */
- BLE_ERROR_PARAM_OUT_OF_RANGE = 3
+ BLE_ERROR_NONE = 0, /**< No error */
+ BLE_ERROR_BUFFER_OVERFLOW = 1, /**< The requested action would cause a buffer overflow and has been aborted */
+ BLE_ERROR_NOT_IMPLEMENTED = 2, /**< Requested a feature that isn't yet implement or isn't supported by the target HW */
+ BLE_ERROR_PARAM_OUT_OF_RANGE = 3 /**< One of the supplied parameters is outside the valid range */
} ble_error_t;
-/* https://developer.bluetooth.org/gatt/units/Pages/default.aspx */
+/**************************************************************************/
+/*!
+ \brief Standard GATT characteristic presentation format unit types.
+ These unit types are used to decribe what the raw numeric
+ data in a characteristic actually represents.
+
+ \note See https://developer.bluetooth.org/gatt/units/Pages/default.aspx
+*/
+/**************************************************************************/
typedef enum ble_gatt_unit_e
{
- BLE_GATT_UNIT_NONE = 0x2700,
- BLE_GATT_UNIT_LENGTH_METRE = 0x2701,
- BLE_GATT_UNIT_MASS_KILOGRAM = 0x2702,
- BLE_GATT_UNIT_TIME_SECOND = 0x2703,
- BLE_GATT_UNIT_ELECTRIC_CURRENT_AMPERE = 0x2704,
- BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_KELVIN = 0x2705,
- BLE_GATT_UNIT_AMOUNT_OF_SUBSTANCE_MOLE = 0x2706,
- BLE_GATT_UNIT_LUMINOUS_INTENSITY_CANDELA = 0x2707,
- BLE_GATT_UNIT_AREA_SQUARE_METRES = 0x2710,
- BLE_GATT_UNIT_VOLUME_CUBIC_METRES = 0x2711,
- BLE_GATT_UNIT_VELOCITY_METRES_PER_SECOND = 0x2712,
- BLE_GATT_UNIT_ACCELERATION_METRES_PER_SECOND_SQUARED = 0x2713,
- BLE_GATT_UNIT_WAVENUMBER_RECIPROCAL_METRE = 0x2714,
- BLE_GATT_UNIT_DENSITY_KILOGRAM_PER_CUBIC_METRE = 0x2715,
- BLE_GATT_UNIT_SURFACE_DENSITY_KILOGRAM_PER_SQUARE_METRE = 0x2716,
- BLE_GATT_UNIT_SPECIFIC_VOLUME_CUBIC_METRE_PER_KILOGRAM = 0x2717,
- BLE_GATT_UNIT_CURRENT_DENSITY_AMPERE_PER_SQUARE_METRE = 0x2718,
- BLE_GATT_UNIT_MAGNETIC_FIELD_STRENGTH_AMPERE_PER_METRE = 0x2719,
- BLE_GATT_UNIT_AMOUNT_CONCENTRATION_MOLE_PER_CUBIC_METRE = 0x271A,
- BLE_GATT_UNIT_MASS_CONCENTRATION_KILOGRAM_PER_CUBIC_METRE = 0x271B,
- BLE_GATT_UNIT_LUMINANCE_CANDELA_PER_SQUARE_METRE = 0x271C,
- BLE_GATT_UNIT_REFRACTIVE_INDEX = 0x271D,
- BLE_GATT_UNIT_RELATIVE_PERMEABILITY = 0x271E,
- BLE_GATT_UNIT_PLANE_ANGLE_RADIAN = 0x2720,
- BLE_GATT_UNIT_SOLID_ANGLE_STERADIAN = 0x2721,
- BLE_GATT_UNIT_FREQUENCY_HERTZ = 0x2722,
- BLE_GATT_UNIT_FORCE_NEWTON = 0x2723,
- BLE_GATT_UNIT_PRESSURE_PASCAL = 0x2724,
- BLE_GATT_UNIT_ENERGY_JOULE = 0x2725,
- BLE_GATT_UNIT_POWER_WATT = 0x2726,
- BLE_GATT_UNIT_ELECTRIC_CHARGE_COULOMB = 0x2727,
- BLE_GATT_UNIT_ELECTRIC_POTENTIAL_DIFFERENCE_VOLT = 0x2728,
- BLE_GATT_UNIT_CAPACITANCE_FARAD = 0x2729,
- BLE_GATT_UNIT_ELECTRIC_RESISTANCE_OHM = 0x272A,
- BLE_GATT_UNIT_ELECTRIC_CONDUCTANCE_SIEMENS = 0x272B,
- BLE_GATT_UNIT_MAGNETIC_FLEX_WEBER = 0x272C,
- BLE_GATT_UNIT_MAGNETIC_FLEX_DENSITY_TESLA = 0x272D,
- BLE_GATT_UNIT_INDUCTANCE_HENRY = 0x272E,
- BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_CELSIUS = 0x272F,
- BLE_GATT_UNIT_LUMINOUS_FLUX_LUMEN = 0x2730,
- BLE_GATT_UNIT_ILLUMINANCE_LUX = 0x2731,
- BLE_GATT_UNIT_ACTIVITY_REFERRED_TO_A_RADIONUCLIDE_BECQUEREL = 0x2732,
- BLE_GATT_UNIT_ABSORBED_DOSE_GRAY = 0x2733,
- BLE_GATT_UNIT_DOSE_EQUIVALENT_SIEVERT = 0x2734,
- BLE_GATT_UNIT_CATALYTIC_ACTIVITY_KATAL = 0x2735,
- BLE_GATT_UNIT_DYNAMIC_VISCOSITY_PASCAL_SECOND = 0x2740,
- BLE_GATT_UNIT_MOMENT_OF_FORCE_NEWTON_METRE = 0x2741,
- BLE_GATT_UNIT_SURFACE_TENSION_NEWTON_PER_METRE = 0x2742,
- BLE_GATT_UNIT_ANGULAR_VELOCITY_RADIAN_PER_SECOND = 0x2743,
- BLE_GATT_UNIT_ANGULAR_ACCELERATION_RADIAN_PER_SECOND_SQUARED = 0x2744,
- BLE_GATT_UNIT_HEAT_FLUX_DENSITY_WATT_PER_SQUARE_METRE = 0x2745,
- BLE_GATT_UNIT_HEAT_CAPACITY_JOULE_PER_KELVIN = 0x2746,
- BLE_GATT_UNIT_SPECIFIC_HEAT_CAPACITY_JOULE_PER_KILOGRAM_KELVIN = 0x2747,
- BLE_GATT_UNIT_SPECIFIC_ENERGY_JOULE_PER_KILOGRAM = 0x2748,
- BLE_GATT_UNIT_THERMAL_CONDUCTIVITY_WATT_PER_METRE_KELVIN = 0x2749,
- BLE_GATT_UNIT_ENERGY_DENSITY_JOULE_PER_CUBIC_METRE = 0x274A,
- BLE_GATT_UNIT_ELECTRIC_FIELD_STRENGTH_VOLT_PER_METRE = 0x274B,
- BLE_GATT_UNIT_ELECTRIC_CHARGE_DENSITY_COULOMB_PER_CUBIC_METRE = 0x274C,
- BLE_GATT_UNIT_SURFACE_CHARGE_DENSITY_COULOMB_PER_SQUARE_METRE = 0x274D,
- BLE_GATT_UNIT_ELECTRIC_FLUX_DENSITY_COULOMB_PER_SQUARE_METRE = 0x274E,
- BLE_GATT_UNIT_PERMITTIVITY_FARAD_PER_METRE = 0x274F,
- BLE_GATT_UNIT_PERMEABILITY_HENRY_PER_METRE = 0x2750,
- BLE_GATT_UNIT_MOLAR_ENERGY_JOULE_PER_MOLE = 0x2751,
- BLE_GATT_UNIT_MOLAR_ENTROPY_JOULE_PER_MOLE_KELVIN = 0x2752,
- BLE_GATT_UNIT_EXPOSURE_COULOMB_PER_KILOGRAM = 0x2753,
- BLE_GATT_UNIT_ABSORBED_DOSE_RATE_GRAY_PER_SECOND = 0x2754,
- BLE_GATT_UNIT_RADIANT_INTENSITY_WATT_PER_STERADIAN = 0x2755,
- BLE_GATT_UNIT_RADIANCE_WATT_PER_SQUARE_METRE_STERADIAN = 0x2756,
- BLE_GATT_UNIT_CATALYTIC_ACTIVITY_CONCENTRATION_KATAL_PER_CUBIC_METRE = 0x2757,
- BLE_GATT_UNIT_TIME_MINUTE = 0x2760,
- BLE_GATT_UNIT_TIME_HOUR = 0x2761,
- BLE_GATT_UNIT_TIME_DAY = 0x2762,
- BLE_GATT_UNIT_PLANE_ANGLE_DEGREE = 0x2763,
- BLE_GATT_UNIT_PLANE_ANGLE_MINUTE = 0x2764,
- BLE_GATT_UNIT_PLANE_ANGLE_SECOND = 0x2765,
- BLE_GATT_UNIT_AREA_HECTARE = 0x2766,
- BLE_GATT_UNIT_VOLUME_LITRE = 0x2767,
- BLE_GATT_UNIT_MASS_TONNE = 0x2768,
- BLE_GATT_UNIT_PRESSURE_BAR = 0x2780,
- BLE_GATT_UNIT_PRESSURE_MILLIMETRE_OF_MERCURY = 0x2781,
- BLE_GATT_UNIT_LENGTH_ANGSTROM = 0x2782,
- BLE_GATT_UNIT_LENGTH_NAUTICAL_MILE = 0x2783,
- BLE_GATT_UNIT_AREA_BARN = 0x2784,
- BLE_GATT_UNIT_VELOCITY_KNOT = 0x2785,
- BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_NEPER = 0x2786,
- BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_BEL = 0x2787,
- BLE_GATT_UNIT_LENGTH_YARD = 0x27A0,
- BLE_GATT_UNIT_LENGTH_PARSEC = 0x27A1,
- BLE_GATT_UNIT_LENGTH_INCH = 0x27A2,
- BLE_GATT_UNIT_LENGTH_FOOT = 0x27A3,
- BLE_GATT_UNIT_LENGTH_MILE = 0x27A4,
- BLE_GATT_UNIT_PRESSURE_POUND_FORCE_PER_SQUARE_INCH = 0x27A5,
- BLE_GATT_UNIT_VELOCITY_KILOMETRE_PER_HOUR = 0x27A6,
- BLE_GATT_UNIT_VELOCITY_MILE_PER_HOUR = 0x27A7,
- BLE_GATT_UNIT_ANGULAR_VELOCITY_REVOLUTION_PER_MINUTE = 0x27A8,
- BLE_GATT_UNIT_ENERGY_GRAM_CALORIE = 0x27A9,
- BLE_GATT_UNIT_ENERGY_KILOGRAM_CALORIE = 0x27AA,
- BLE_GATT_UNIT_ENERGY_KILOWATT_HOUR = 0x27AB,
- BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_FAHRENHEIT = 0x27AC,
- BLE_GATT_UNIT_PERCENTAGE = 0x27AD,
- BLE_GATT_UNIT_PER_MILLE = 0x27AE,
- BLE_GATT_UNIT_PERIOD_BEATS_PER_MINUTE = 0x27AF,
- BLE_GATT_UNIT_ELECTRIC_CHARGE_AMPERE_HOURS = 0x27B0,
- BLE_GATT_UNIT_MASS_DENSITY_MILLIGRAM_PER_DECILITRE = 0x27B1,
- BLE_GATT_UNIT_MASS_DENSITY_MILLIMOLE_PER_LITRE = 0x27B2,
- BLE_GATT_UNIT_TIME_YEAR = 0x27B3,
- BLE_GATT_UNIT_TIME_MONTH = 0x27B4,
- BLE_GATT_UNIT_CONCENTRATION_COUNT_PER_CUBIC_METRE = 0x27B5,
- BLE_GATT_UNIT_IRRADIANCE_WATT_PER_SQUARE_METRE = 0x27B6
+ BLE_GATT_UNIT_NONE = 0x2700, /**< No specified unit type */
+ BLE_GATT_UNIT_LENGTH_METRE = 0x2701, /**< Length, Metre */
+ BLE_GATT_UNIT_MASS_KILOGRAM = 0x2702, /**< Mass, Kilogram */
+ BLE_GATT_UNIT_TIME_SECOND = 0x2703, /**< Time, Second */
+ BLE_GATT_UNIT_ELECTRIC_CURRENT_AMPERE = 0x2704, /**< Electric Current, Ampere */
+ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_KELVIN = 0x2705, /**< Thermodynamic Temperature, Kelvin */
+ BLE_GATT_UNIT_AMOUNT_OF_SUBSTANCE_MOLE = 0x2706, /**< Amount of Substance, Mole */
+ BLE_GATT_UNIT_LUMINOUS_INTENSITY_CANDELA = 0x2707, /**< Luminous Intensity, Candela */
+ BLE_GATT_UNIT_AREA_SQUARE_METRES = 0x2710, /**< Area, Square Metres */
+ BLE_GATT_UNIT_VOLUME_CUBIC_METRES = 0x2711, /**< Volume, Cubic Metres*/
+ BLE_GATT_UNIT_VELOCITY_METRES_PER_SECOND = 0x2712, /**< Velocity, Metres per Second*/
+ BLE_GATT_UNIT_ACCELERATION_METRES_PER_SECOND_SQUARED = 0x2713, /**< Acceleration, Metres per Second Squared */
+ BLE_GATT_UNIT_WAVENUMBER_RECIPROCAL_METRE = 0x2714, /**< Wave Number Reciprocal, Metre */
+ BLE_GATT_UNIT_DENSITY_KILOGRAM_PER_CUBIC_METRE = 0x2715, /**< Density, Kilogram per Cubic Metre */
+ BLE_GATT_UNIT_SURFACE_DENSITY_KILOGRAM_PER_SQUARE_METRE = 0x2716, /**< */
+ BLE_GATT_UNIT_SPECIFIC_VOLUME_CUBIC_METRE_PER_KILOGRAM = 0x2717, /**< */
+ BLE_GATT_UNIT_CURRENT_DENSITY_AMPERE_PER_SQUARE_METRE = 0x2718, /**< */
+ BLE_GATT_UNIT_MAGNETIC_FIELD_STRENGTH_AMPERE_PER_METRE = 0x2719, /**< Magnetic Field Strength, Ampere per Metre */
+ BLE_GATT_UNIT_AMOUNT_CONCENTRATION_MOLE_PER_CUBIC_METRE = 0x271A, /**< */
+ BLE_GATT_UNIT_MASS_CONCENTRATION_KILOGRAM_PER_CUBIC_METRE = 0x271B, /**< */
+ BLE_GATT_UNIT_LUMINANCE_CANDELA_PER_SQUARE_METRE = 0x271C, /**< */
+ BLE_GATT_UNIT_REFRACTIVE_INDEX = 0x271D, /**< */
+ BLE_GATT_UNIT_RELATIVE_PERMEABILITY = 0x271E, /**< */
+ BLE_GATT_UNIT_PLANE_ANGLE_RADIAN = 0x2720, /**< */
+ BLE_GATT_UNIT_SOLID_ANGLE_STERADIAN = 0x2721, /**< */
+ BLE_GATT_UNIT_FREQUENCY_HERTZ = 0x2722, /**< Frequency, Hertz */
+ BLE_GATT_UNIT_FORCE_NEWTON = 0x2723, /**< Force, Newton */
+ BLE_GATT_UNIT_PRESSURE_PASCAL = 0x2724, /**< Pressure, Pascal */
+ BLE_GATT_UNIT_ENERGY_JOULE = 0x2725, /**< Energy, Joule */
+ BLE_GATT_UNIT_POWER_WATT = 0x2726, /**< Power, Watt */
+ BLE_GATT_UNIT_ELECTRIC_CHARGE_COULOMB = 0x2727, /**< Electrical Charge, Coulomb */
+ BLE_GATT_UNIT_ELECTRIC_POTENTIAL_DIFFERENCE_VOLT = 0x2728, /**< Electrical Potential Difference, Voltage */
+ BLE_GATT_UNIT_CAPACITANCE_FARAD = 0x2729, /**< */
+ BLE_GATT_UNIT_ELECTRIC_RESISTANCE_OHM = 0x272A, /**< */
+ BLE_GATT_UNIT_ELECTRIC_CONDUCTANCE_SIEMENS = 0x272B, /**< */
+ BLE_GATT_UNIT_MAGNETIC_FLEX_WEBER = 0x272C, /**< */
+ BLE_GATT_UNIT_MAGNETIC_FLEX_DENSITY_TESLA = 0x272D, /**< */
+ BLE_GATT_UNIT_INDUCTANCE_HENRY = 0x272E, /**< */
+ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_CELSIUS = 0x272F, /**< */
+ BLE_GATT_UNIT_LUMINOUS_FLUX_LUMEN = 0x2730, /**< */
+ BLE_GATT_UNIT_ILLUMINANCE_LUX = 0x2731, /**< */
+ BLE_GATT_UNIT_ACTIVITY_REFERRED_TO_A_RADIONUCLIDE_BECQUEREL = 0x2732, /**< */
+ BLE_GATT_UNIT_ABSORBED_DOSE_GRAY = 0x2733, /**< */
+ BLE_GATT_UNIT_DOSE_EQUIVALENT_SIEVERT = 0x2734, /**< */
+ BLE_GATT_UNIT_CATALYTIC_ACTIVITY_KATAL = 0x2735, /**< */
+ BLE_GATT_UNIT_DYNAMIC_VISCOSITY_PASCAL_SECOND = 0x2740, /**< */
+ BLE_GATT_UNIT_MOMENT_OF_FORCE_NEWTON_METRE = 0x2741, /**< */
+ BLE_GATT_UNIT_SURFACE_TENSION_NEWTON_PER_METRE = 0x2742, /**< */
+ BLE_GATT_UNIT_ANGULAR_VELOCITY_RADIAN_PER_SECOND = 0x2743, /**< */
+ BLE_GATT_UNIT_ANGULAR_ACCELERATION_RADIAN_PER_SECOND_SQUARED = 0x2744, /**< */
+ BLE_GATT_UNIT_HEAT_FLUX_DENSITY_WATT_PER_SQUARE_METRE = 0x2745, /**< */
+ BLE_GATT_UNIT_HEAT_CAPACITY_JOULE_PER_KELVIN = 0x2746, /**< */
+ BLE_GATT_UNIT_SPECIFIC_HEAT_CAPACITY_JOULE_PER_KILOGRAM_KELVIN = 0x2747, /**< */
+ BLE_GATT_UNIT_SPECIFIC_ENERGY_JOULE_PER_KILOGRAM = 0x2748, /**< */
+ BLE_GATT_UNIT_THERMAL_CONDUCTIVITY_WATT_PER_METRE_KELVIN = 0x2749, /**< */
+ BLE_GATT_UNIT_ENERGY_DENSITY_JOULE_PER_CUBIC_METRE = 0x274A, /**< */
+ BLE_GATT_UNIT_ELECTRIC_FIELD_STRENGTH_VOLT_PER_METRE = 0x274B, /**< */
+ BLE_GATT_UNIT_ELECTRIC_CHARGE_DENSITY_COULOMB_PER_CUBIC_METRE = 0x274C, /**< */
+ BLE_GATT_UNIT_SURFACE_CHARGE_DENSITY_COULOMB_PER_SQUARE_METRE = 0x274D, /**< */
+ BLE_GATT_UNIT_ELECTRIC_FLUX_DENSITY_COULOMB_PER_SQUARE_METRE = 0x274E, /**< */
+ BLE_GATT_UNIT_PERMITTIVITY_FARAD_PER_METRE = 0x274F, /**< */
+ BLE_GATT_UNIT_PERMEABILITY_HENRY_PER_METRE = 0x2750, /**< */
+ BLE_GATT_UNIT_MOLAR_ENERGY_JOULE_PER_MOLE = 0x2751, /**< */
+ BLE_GATT_UNIT_MOLAR_ENTROPY_JOULE_PER_MOLE_KELVIN = 0x2752, /**< */
+ BLE_GATT_UNIT_EXPOSURE_COULOMB_PER_KILOGRAM = 0x2753, /**< */
+ BLE_GATT_UNIT_ABSORBED_DOSE_RATE_GRAY_PER_SECOND = 0x2754, /**< */
+ BLE_GATT_UNIT_RADIANT_INTENSITY_WATT_PER_STERADIAN = 0x2755, /**< */
+ BLE_GATT_UNIT_RADIANCE_WATT_PER_SQUARE_METRE_STERADIAN = 0x2756, /**< */
+ BLE_GATT_UNIT_CATALYTIC_ACTIVITY_CONCENTRATION_KATAL_PER_CUBIC_METRE = 0x2757, /**< */
+ BLE_GATT_UNIT_TIME_MINUTE = 0x2760, /**< Time, Minute */
+ BLE_GATT_UNIT_TIME_HOUR = 0x2761, /**< Time, Hour */
+ BLE_GATT_UNIT_TIME_DAY = 0x2762, /**< Time, Day */
+ BLE_GATT_UNIT_PLANE_ANGLE_DEGREE = 0x2763, /**< */
+ BLE_GATT_UNIT_PLANE_ANGLE_MINUTE = 0x2764, /**< */
+ BLE_GATT_UNIT_PLANE_ANGLE_SECOND = 0x2765, /**< */
+ BLE_GATT_UNIT_AREA_HECTARE = 0x2766, /**< */
+ BLE_GATT_UNIT_VOLUME_LITRE = 0x2767, /**< */
+ BLE_GATT_UNIT_MASS_TONNE = 0x2768, /**< */
+ BLE_GATT_UNIT_PRESSURE_BAR = 0x2780, /**< Pressure, Bar */
+ BLE_GATT_UNIT_PRESSURE_MILLIMETRE_OF_MERCURY = 0x2781, /**< Pressure, Millimetre of Mercury */
+ BLE_GATT_UNIT_LENGTH_ANGSTROM = 0x2782, /**< */
+ BLE_GATT_UNIT_LENGTH_NAUTICAL_MILE = 0x2783, /**< */
+ BLE_GATT_UNIT_AREA_BARN = 0x2784, /**< */
+ BLE_GATT_UNIT_VELOCITY_KNOT = 0x2785, /**< */
+ BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_NEPER = 0x2786, /**< */
+ BLE_GATT_UNIT_LOGARITHMIC_RADIO_QUANTITY_BEL = 0x2787, /**< */
+ BLE_GATT_UNIT_LENGTH_YARD = 0x27A0, /**< Length, Yard */
+ BLE_GATT_UNIT_LENGTH_PARSEC = 0x27A1, /**< Length, Parsec */
+ BLE_GATT_UNIT_LENGTH_INCH = 0x27A2, /**< Length, Inch */
+ BLE_GATT_UNIT_LENGTH_FOOT = 0x27A3, /**< Length, Foot */
+ BLE_GATT_UNIT_LENGTH_MILE = 0x27A4, /**< Length, Mile */
+ BLE_GATT_UNIT_PRESSURE_POUND_FORCE_PER_SQUARE_INCH = 0x27A5, /**< */
+ BLE_GATT_UNIT_VELOCITY_KILOMETRE_PER_HOUR = 0x27A6, /**< Velocity, Kilometre per Hour */
+ BLE_GATT_UNIT_VELOCITY_MILE_PER_HOUR = 0x27A7, /**< Velocity, Mile per Hour */
+ BLE_GATT_UNIT_ANGULAR_VELOCITY_REVOLUTION_PER_MINUTE = 0x27A8, /**< Angular Velocity, Revolution per Minute */
+ BLE_GATT_UNIT_ENERGY_GRAM_CALORIE = 0x27A9, /**< Energy, Gram Calorie */
+ BLE_GATT_UNIT_ENERGY_KILOGRAM_CALORIE = 0x27AA, /**< Energy, Kilogram Calorie */
+ BLE_GATT_UNIT_ENERGY_KILOWATT_HOUR = 0x27AB, /**< Energy, Killowatt Hour */
+ BLE_GATT_UNIT_THERMODYNAMIC_TEMPERATURE_DEGREE_FAHRENHEIT = 0x27AC, /**< */
+ BLE_GATT_UNIT_PERCENTAGE = 0x27AD, /**< Percentage */
+ BLE_GATT_UNIT_PER_MILLE = 0x27AE, /**< */
+ BLE_GATT_UNIT_PERIOD_BEATS_PER_MINUTE = 0x27AF, /**< */
+ BLE_GATT_UNIT_ELECTRIC_CHARGE_AMPERE_HOURS = 0x27B0, /**< */
+ BLE_GATT_UNIT_MASS_DENSITY_MILLIGRAM_PER_DECILITRE = 0x27B1, /**< */
+ BLE_GATT_UNIT_MASS_DENSITY_MILLIMOLE_PER_LITRE = 0x27B2, /**< */
+ BLE_GATT_UNIT_TIME_YEAR = 0x27B3, /**< Time, Year */
+ BLE_GATT_UNIT_TIME_MONTH = 0x27B4, /**< Time, Month */
+ BLE_GATT_UNIT_CONCENTRATION_COUNT_PER_CUBIC_METRE = 0x27B5, /**< */
+ BLE_GATT_UNIT_IRRADIANCE_WATT_PER_SQUARE_METRE = 0x27B6 /**< */
} ble_gatt_unit_t;
-/* Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.3.5.2 */
-/* http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml */
+/**************************************************************************/
+/*!
+ \brief Standard GATT number types
+
+ \note See Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.3.5.2
+ \note See http://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
+*/
+/**************************************************************************/
typedef enum ble_gatt_format_e
{
BLE_GATT_FORMAT_RFU = 0x00, /**< Reserved For Future Use. */
@@ -163,8 +182,14 @@
BLE_GATT_FORMAT_STRUCT = 0x1B /**< Opaque Structure. */
} ble_gatt_format_t;
-/* Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.1.1 */
-/* See Section 3.3.3.1 for Extended Properties */
+/**************************************************************************/
+/*!
+ \brief Standard GATT characteritic properties
+
+ \note See Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.1.1
+ and Section 3.3.3.1 for Extended Properties
+*/
+/**************************************************************************/
typedef enum ble_gatt_char_properties_e
{
BLE_GATT_CHAR_PROPERTIES_BROADCAST = 0x01, /**< Permits broadcasts of the Characteristic Value using Server Characteristic Configuration Descriptor. */
@@ -177,8 +202,14 @@
BLE_GATT_CHAR_PROPERTIES_EXTENDED_PROPERTIES = 0x80 /**< Additional characteristic properties are defined in the Characteristic Extended Properties Descriptor */
} ble_gatt_char_properties_t;
-/* Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.3.5 */
-/* See https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml */
+/**************************************************************************/
+/*!
+ \brief GATT presentation format wrapper
+
+ \note See Bluetooth Specification 4.0 (Vol. 3), Part G, Section 3.3.3.5
+ \note See https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.characteristic_presentation_format.xml
+*/
+/**************************************************************************/
typedef struct PresentationFormat
{
uint8_t gatt_format; /**< Format of the value, see @ref ble_gatt_format_t. */
