summaryrefslogtreecommitdiffstats
path: root/libsensors/mlsdk/mllite/ml_stored_data.h
blob: 74c2b7c48fc7a61ca4279d09508f6c91fd84fe2b (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
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 $License:
   Copyright 2011 InvenSense, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
  $
 */

/*******************************************************************************
 *
 * $Id:$
 *
 ******************************************************************************/

#ifndef INV_STORED_DATA_H
#define INV_STORED_DATA_H

#ifdef __cplusplus
extern "C" {
#endif

/*
    Includes.
*/

#include "mltypes.h"

/*
    Defines
*/
#define INV_CAL_ACCEL_LEN    (12)
#define INV_CAL_COMPASS_LEN  (555 + 5)
#define INV_CAL_HDR_LEN      (6)
#define INV_CAL_CHK_LEN      (4)

/*
    APIs
*/
    inv_error_t inv_load_calibration(void);
    inv_error_t inv_store_calibration(void);

/*
    Other prototypes
*/
    inv_error_t inv_load_cal(unsigned char *calData);
    inv_error_t inv_store_cal(unsigned char *calData, int length);
    unsigned int inv_get_cal_length(void);

#ifdef __cplusplus
}
#endif
#endif                          /* INV_STORED_DATA_H */