APDS9930.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. *
  3. * This software is licensed under the terms of the GNU General Public
  4. * License version 2, as published by the Free Software Foundation, and
  5. * may be copied, distributed, and modified under those terms.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. */
  13. /*
  14. * Definitions for APDS9930 als/ps sensor chip.
  15. */
  16. #ifndef __APDS9930_H__
  17. #define __APDS9930_H__
  18. #include <linux/ioctl.h>
  19. #define APDS9930_CMM_ENABLE 0X80
  20. #define APDS9930_CMM_ATIME 0X81
  21. #define APDS9930_CMM_PTIME 0X82
  22. #define APDS9930_CMM_WTIME 0X83
  23. /*for interrupt work mode support -- by liaoxl.lenovo 12.08.2011*/
  24. #define APDS9930_CMM_INT_LOW_THD_LOW 0X88
  25. #define APDS9930_CMM_INT_LOW_THD_HIGH 0X89
  26. #define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A
  27. #define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B
  28. #define APDS9930_CMM_Persistence 0X8C
  29. #define APDS9930_CMM_STATUS 0X93
  30. #define TAOS_TRITON_CMD_REG 0X80
  31. #define TAOS_TRITON_CMD_SPL_FN 0x60
  32. #define APDS9930_CMM_CONFIG 0X8D
  33. #define APDS9930_CMM_PPCOUNT 0X8E
  34. #define APDS9930_CMM_CONTROL 0X8F
  35. #define APDS9930_CMM_PDATA_L 0X98
  36. #define APDS9930_CMM_PDATA_H 0X99
  37. #define APDS9930_CMM_C0DATA_L 0X94
  38. #define APDS9930_CMM_C0DATA_H 0X95
  39. #define APDS9930_CMM_C1DATA_L 0X96
  40. #define APDS9930_CMM_C1DATA_H 0X97
  41. #define APDS9930_SUCCESS 0
  42. #define APDS9930_ERR_I2C -1
  43. #define APDS9930_ERR_STATUS -3
  44. #define APDS9930_ERR_SETUP_FAILURE -4
  45. #define APDS9930_ERR_GETGSENSORDATA -5
  46. #define APDS9930_ERR_IDENTIFICATION -6
  47. #endif