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
|
/*
$License:
Copyright (C) 2010 InvenSense Corporation, All Rights Reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
$
*/
/**
* @defgroup
* @brief
*
* @{
* @file mpu-i2c.c
* @brief
*
*
*/
#ifndef __MPU_I2C_H__
#define __MPU_I2C_H__
#include <linux/i2c.h>
int sensor_i2c_write(struct i2c_adapter *i2c_adap,
unsigned char address,
unsigned int len, unsigned char const *data);
int sensor_i2c_write_register(struct i2c_adapter *i2c_adap,
unsigned char address,
unsigned char reg, unsigned char value);
int sensor_i2c_read(struct i2c_adapter *i2c_adap,
unsigned char address,
unsigned char reg,
unsigned int len, unsigned char *data);
int mpu_memory_read(struct i2c_adapter *i2c_adap,
unsigned char mpu_addr,
unsigned short mem_addr,
unsigned int len, unsigned char *data);
int mpu_memory_write(struct i2c_adapter *i2c_adap,
unsigned char mpu_addr,
unsigned short mem_addr,
unsigned int len, unsigned char const *data);
#endif /* __MPU_I2C_H__ */
|