-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.h
46 lines (34 loc) · 999 Bytes
/
common.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
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef COMMON_H
#define COMMON_H
#include "Arduino.h"
#define uint unsigned int
#define ulong unsigned long
#define bool boolean
/***************************************************
* Constantes
****************************************************/
const uint DEVICE_TYPE_MOTOR = 0x0010;
const uint DEVICE_TYPE_ULTRASONIC = 0x0020;
const uint DEVICE_TYPE_HYDROMETRIC = 0x0030;
const uint DEVICE_TYPE_DISPLAY_DOUBLELED = 0x1010;
/***************************************************
* Structures
****************************************************/
typedef struct{
uint Id;
uint uiType;
void* pDevice;
char* strName;
}
Device;
/***************************************************
* Fonctions
****************************************************/
Device* device_configure(Device* device, uint id,uint type, void* pdevice, char* deviceName){
device->Id = id;
device->uiType = type;
device->pDevice = pdevice;
device->strName = deviceName;
return device;
}
#endif