A cute tiny piece of code implementing an IoT NAND device, demonstrating how to setup and advertise a cute GATT (NAND) service. The code has been tested on a Nordic nRF51822-DK.

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_HeartRate_IDB0XA1 by ST

Committer:
hux
Date:
Sun Jan 08 23:15:53 2017 +0000
Revision:
23:2e73c391bb12
A cute tiny piece of code implementing an Iot NAND device, demonstrating how to setup and advertise a cute GATT (NAND) service.

Who changed what in which revision?

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