alps_compass_io.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* alps_compass_io.h
  2. *
  3. * I/O controll header for alps sensor
  4. *
  5. * Copyright (C) 2011-2012 ALPS ELECTRIC CO., LTD. All Rights Reserved.
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef ___ALPS_IO_H_INCLUDED
  18. #define ___ALPS_IO_H_INCLUDED
  19. #include <linux/ioctl.h>
  20. #define ALPSIO 0xAF
  21. #define ALPSIO_SET_MAGACTIVATE _IOW(ALPSIO, 0, int)
  22. #define ALPSIO_SET_ACCACTIVATE _IOW(ALPSIO, 1, int)
  23. #define ALPSIO_SET_DELAY _IOW(ALPSIO, 2, int)
  24. #define ALPSIO_ACT_SELF_TEST_A _IOR(ALPSIO, 3, int)
  25. #define ALPSIO_ACT_SELF_TEST_B _IOR(ALPSIO, 4, int)
  26. #define ALPSIO_REOPT_VAL _IOW(ALPSIO, 5, int)
  27. //extern int accsns_get_acceleration_data(int *xyz);
  28. extern int hscd_get_magnetic_field_data(int *xyz);
  29. extern void hscd_activate(int flgatm, int flg, int dtime);
  30. //extern void accsns_activate(int flgatm, int flg, int dtime);
  31. extern int hscd_self_test_A(void);
  32. extern int hscd_self_test_B(void);
  33. #endif