A nice BLE demo program which allows remote switch of an LED via GATT interface.

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_Button by Bluetooth Low Energy

Committer:
hux
Date:
Sat Oct 21 19:56:15 2017 +0000
Revision:
13:0563f1aa6a75
Switch LED via BLE GATT

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hux 13:0563f1aa6a75 1 // types.h - declaring some common types
hux 13:0563f1aa6a75 2 //
hux 13:0563f1aa6a75 3 // The type identifiers are all begining with capital letter in order to leave
hux 13:0563f1aa6a75 4 // the lower capital identifiers free for 'overloaded' variable or characteristic
hux 13:0563f1aa6a75 5 // identifiers.
hux 13:0563f1aa6a75 6 //
hux 13:0563f1aa6a75 7
hux 13:0563f1aa6a75 8 #ifndef _TYPES_H_
hux 13:0563f1aa6a75 9 #define _TYPES_H_
hux 13:0563f1aa6a75 10
hux 13:0563f1aa6a75 11 #define SIZE_OBJECTNAME 40
hux 13:0563f1aa6a75 12 #define SIZE_INIBUFFER SIZE_OBJECTNAME
hux 13:0563f1aa6a75 13
hux 13:0563f1aa6a75 14 typedef uint8_t ObjectId[6];
hux 13:0563f1aa6a75 15 typedef char ObjectName[SIZE_OBJECTNAME]; // use UTF8S coded characters
hux 13:0563f1aa6a75 16 typedef uint8_t Bool;
hux 13:0563f1aa6a75 17 typedef uint8_t Digital;
hux 13:0563f1aa6a75 18 typedef uint8_t DateTime[10];
hux 13:0563f1aa6a75 19 typedef uint8_t Buffer[10];
hux 13:0563f1aa6a75 20
hux 13:0563f1aa6a75 21 typedef uint8_t IniBuffer[SIZE_INIBUFFER];
hux 13:0563f1aa6a75 22
hux 13:0563f1aa6a75 23
hux 13:0563f1aa6a75 24 #endif // _TYPES_H_