aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mpu3050/mlsl.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/misc/mpu3050/mlsl.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'drivers/misc/mpu3050/mlsl.h')
-rw-r--r--drivers/misc/mpu3050/mlsl.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/drivers/misc/mpu3050/mlsl.h b/drivers/misc/mpu3050/mlsl.h
new file mode 100644
index 00000000000..76f69c77ba9
--- /dev/null
+++ b/drivers/misc/mpu3050/mlsl.h
@@ -0,0 +1,103 @@
1/*
2 $License:
3 Copyright (C) 2010 InvenSense Corporation, All Rights Reserved.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 $
18 */
19
20#ifndef __MSSL_H__
21#define __MSSL_H__
22
23#include "mltypes.h"
24#include "mpu.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30/* ------------ */
31/* - Defines. - */
32/* ------------ */
33
34/*
35 * NOTE : to properly support Yamaha compass reads,
36 * the max transfer size should be at least 9 B.
37 * Length in bytes, typically a power of 2 >= 2
38 */
39#define SERIAL_MAX_TRANSFER_SIZE 128
40
41/* ---------------------- */
42/* - Types definitions. - */
43/* ---------------------- */
44
45/* --------------------- */
46/* - Function p-types. - */
47/* --------------------- */
48
49 tMLError MLSLSerialOpen(char const *port,
50 void **sl_handle);
51 tMLError MLSLSerialReset(void *sl_handle);
52 tMLError MLSLSerialClose(void *sl_handle);
53
54 tMLError MLSLSerialWriteSingle(void *sl_handle,
55 unsigned char slaveAddr,
56 unsigned char registerAddr,
57 unsigned char data);
58
59 tMLError MLSLSerialRead(void *sl_handle,
60 unsigned char slaveAddr,
61 unsigned char registerAddr,
62 unsigned short length,
63 unsigned char *data);
64
65 tMLError MLSLSerialWrite(void *sl_handle,
66 unsigned char slaveAddr,
67 unsigned short length,
68 unsigned char const *data);
69
70 tMLError MLSLSerialReadMem(void *sl_handle,
71 unsigned char slaveAddr,
72 unsigned short memAddr,
73 unsigned short length,
74 unsigned char *data);
75
76 tMLError MLSLSerialWriteMem(void *sl_handle,
77 unsigned char slaveAddr,
78 unsigned short memAddr,
79 unsigned short length,
80 unsigned char const *data);
81
82 tMLError MLSLSerialReadFifo(void *sl_handle,
83 unsigned char slaveAddr,
84 unsigned short length,
85 unsigned char *data);
86
87 tMLError MLSLSerialWriteFifo(void *sl_handle,
88 unsigned char slaveAddr,
89 unsigned short length,
90 unsigned char const *data);
91
92 tMLError MLSLWriteCal(unsigned char *cal, unsigned int len);
93 tMLError MLSLReadCal(unsigned char *cal, unsigned int len);
94 tMLError MLSLGetCalLength(unsigned int *len);
95
96#ifdef __cplusplus
97}
98#endif
99
100/**
101 * @}
102 */
103#endif /* MLSL_H */