summaryrefslogtreecommitdiff
path: root/6515/libsensors_iio/software/core/mllite/message_layer.h
blob: 321b5ee8583c2a2bc1abb33a24ae2788fdff0441 (plain)
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
/*
 $License:
    Copyright (C) 2011-2012 InvenSense Corporation, All Rights Reserved.
    See included License.txt for License information.
 $
 */
#ifndef INV_MESSAGE_LAYER_H__
#define INV_MESSAGE_LAYER_H__

#include "mltypes.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Level 0 Type Messages */
/** A motion event has occured */
#define INV_MSG_MOTION_EVENT                (0x01)
/** A no motion event has occured */
#define INV_MSG_NO_MOTION_EVENT             (0x02)
/** A setting of the gyro bias has occured */
#define INV_MSG_NEW_GB_EVENT                (0x04)
/** A setting of the compass bias has occured */
#define INV_MSG_NEW_CB_EVENT                (0x08)
/** A setting of the accel bias has occured */
#define INV_MSG_NEW_AB_EVENT                (0x10)
/** Sensor fusion has switched from 9- to 6-axes
    because of a magnetic disturbance */
#define INV_MSG_6X_SF_EVENT    (0x020)
/** Compass accuracy has dropped has dropped to 0
    because of a magnetic disturbance */
#define INV_MSG_HEADING_NOT_ACCURATE_EVENT  (0x40)
/** A setting of the factory gyro bias has occured */
#define INV_MSG_NEW_FGB_EVENT            (0x80)
/** A setting of the factory accel bias has occured */
#define INV_MSG_NEW_FAB_EVENT            (0x100)

#ifdef WIN32
#define INV_MSG_NEW_DMP_QUAT_WRITE_EVENT    (0x200)
#endif

void inv_set_message(long set, long clear, int level);
long inv_get_message_level_0(int clear);

#ifdef __cplusplus
}
#endif

#endif  // INV_MESSAGE_LAYER_H__