-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper.h
33 lines (24 loc) · 715 Bytes
/
helper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __APPBUI_HELPER__
#define __APPBUI_HELPER__
#include "arduino.h"
//! Typedef for an universial id
typedef unsigned char uid8;
//! Simplification
typedef unsigned char byte;
//! Show that the stack's two bytes long
typedef unsigned int twobytes;
//! A generic callback used for everything, e.g. connect, disconnect, etc.
typedef void (*gen_callback)(uid8, char *);
//! Structure to save callbacks by id
struct callback_dictionary
{
uid8 *id; //! The id of the element
gen_callback *callback; //! The corresponding callback
};
//! Informations for the handshake
struct handshake_informations
{
char *phrase; //! The actual handshake phrase
byte attempts; //! Num of attempts
};
#endif