1 #ifndef AKM8973_H 2 #define AKM8973_H 3 4 #include <linux/ioctl.h> 5 6 #define AKMIO 0xA1 7 8 #define ECS_IOCTL_WRITE _IOW(AKMIO, 0x01, char[5]) 9 #define ECS_IOCTL_READ _IOWR(AKMIO, 0x02, char[5]) 10 #define ECS_IOCTL_RESET _IO(AKMIO, 0x03) 11 #define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x04, short) 12 #define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x05, char[RBUFF_SIZE+1]) 13 #define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x06, short[12]) 14 #define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x07, int) 15 #define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x08, int) 16 #define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short) 17 18 #define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short) 19 #define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short) 20 #define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short) 21 #define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short) 22 #define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short) 23 #define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short) 24 #define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short) 25 #define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17) 26 #define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short) 27 #define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY 28 #define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) /* Set raw magnetic vector flag */ 29 #define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) /* Get raw magnetic vector flag */ 30 31 #define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short) 32 #endif 33 34