mpu-i2c.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. $License:
  3. Copyright (C) 2010 InvenSense Corporation, All Rights Reserved.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. $
  15. */
  16. /**
  17. * @defgroup
  18. * @brief
  19. *
  20. * @{
  21. * @file mpu-i2c.c
  22. * @brief
  23. *
  24. *
  25. */
  26. #ifndef __MPU_I2C_H__
  27. #define __MPU_I2C_H__
  28. #include <linux/i2c.h>
  29. int sensor_i2c_write(struct i2c_adapter *i2c_adap,
  30. unsigned char address,
  31. unsigned int len, unsigned char const *data);
  32. int sensor_i2c_write_register(struct i2c_adapter *i2c_adap,
  33. unsigned char address,
  34. unsigned char reg, unsigned char value);
  35. int sensor_i2c_read(struct i2c_adapter *i2c_adap,
  36. unsigned char address,
  37. unsigned char reg,
  38. unsigned int len, unsigned char *data);
  39. int mpu_memory_read(struct i2c_adapter *i2c_adap,
  40. unsigned char mpu_addr,
  41. unsigned short mem_addr,
  42. unsigned int len, unsigned char *data);
  43. int mpu_memory_write(struct i2c_adapter *i2c_adap,
  44. unsigned char mpu_addr,
  45. unsigned short mem_addr,
  46. unsigned int len, unsigned char const *data);
  47. #endif /* __MPU_I2C_H__ */