-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathamoldproto.h
66 lines (54 loc) · 1.48 KB
/
amoldproto.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
* Old Amiigo protocol and definitions for backward compatibility
*
* @date March 14, 2014
* @author: dashesy
* @copyright Amiigo Inc.
*/
#ifndef AMOLDPROTO_H
#define AMOLDPROTO_H
#include "amidefs.h"
#include "amproto.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
uint8 unused0;
uint8 unused1;
// Samples will be taken at the above rate for 'duration' seconds
// every 'interval' seconds. Sampling is disabled if interval is 0.
uint16 fast_interval;
uint16 slow_interval;
uint16 sleep_interval;
uint8 duration;
uint8 unused2;
uint8 unused3;
uint8 unused4;
uint8 unused5;
uint8 debug; // Console output debug level, set to 0 for normal operation
uint8 unused6;
uint8 unused7;
uint8 movement; // average movement level at wich starting a reading is allowed
uint8 flags; // Contol Bits
} PACKED WEDConfigLS_1816;
// Top-level struct for characteristic UUID AMI_UUID(WED_UUID_CONFIG)
typedef struct {
// WED_CFG_TYPE identifying following struct type
uint8 config_type;
// Structure corresponding to config_type
union {
WEDConfigGeneral general;
WEDConfigAccel accel;
WEDConfigLS_1816 lightsensor;
WEDConfigTemp temp;
WEDConfigMaint maint;
WEDConfigLog log;
WEDConfigConn conn;
WEDConfigName name;
};
} PACKED WEDConfig_1816;
int exec_configls_18116(int sock);
#ifdef __cplusplus
}
#endif
#endif // include guard