Microbug / BLE_API_FOTA

Fork of BLE_API by Bluetooth Low Energy

Committer:
ktownsend
Date:
Fri Nov 29 14:42:22 2013 +0000
Revision:
0:ace2e8d3ce79
First commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ktownsend 0:ace2e8d3ce79 1 #ifndef __UUID_H__
ktownsend 0:ace2e8d3ce79 2 #define __UUID_H__
ktownsend 0:ace2e8d3ce79 3
ktownsend 0:ace2e8d3ce79 4 #include "blecommon.h"
ktownsend 0:ace2e8d3ce79 5
ktownsend 0:ace2e8d3ce79 6 class UUID
ktownsend 0:ace2e8d3ce79 7 {
ktownsend 0:ace2e8d3ce79 8 private:
ktownsend 0:ace2e8d3ce79 9
ktownsend 0:ace2e8d3ce79 10 public:
ktownsend 0:ace2e8d3ce79 11 enum
ktownsend 0:ace2e8d3ce79 12 {
ktownsend 0:ace2e8d3ce79 13 UUID_TYPE_SHORT = 0, // Short BLE UUID
ktownsend 0:ace2e8d3ce79 14 UUID_TYPE_LONG = 1 // Full 128-bit UUID
ktownsend 0:ace2e8d3ce79 15 };
ktownsend 0:ace2e8d3ce79 16
ktownsend 0:ace2e8d3ce79 17 UUID(void);
ktownsend 0:ace2e8d3ce79 18 UUID(uint8_t const[16]);
ktownsend 0:ace2e8d3ce79 19 UUID(uint16_t const);
ktownsend 0:ace2e8d3ce79 20 virtual ~UUID(void);
ktownsend 0:ace2e8d3ce79 21
ktownsend 0:ace2e8d3ce79 22 uint8_t type; // UUID_TYPE_SHORT or UUID_TYPE_LONG
ktownsend 0:ace2e8d3ce79 23 uint8_t base[16]; // in case of custom
ktownsend 0:ace2e8d3ce79 24 uint16_t value; // 16 bit uuid (byte 2-3 using with base)
ktownsend 0:ace2e8d3ce79 25
ktownsend 0:ace2e8d3ce79 26 ble_error_t update(uint8_t const[16]);
ktownsend 0:ace2e8d3ce79 27 ble_error_t update(uint16_t const);
ktownsend 0:ace2e8d3ce79 28 };
ktownsend 0:ace2e8d3ce79 29
ktownsend 0:ace2e8d3ce79 30 #endif