Commit | Line | Data |
---|---|---|
6fa3eb70 S |
1 | #ifndef _OV8825AF_H |
2 | #define _OV8825AF_H | |
3 | ||
4 | #include <linux/ioctl.h> | |
5 | //#include "kd_imgsensor.h" | |
6 | ||
7 | #define OV8825AF_MAGIC 'A' | |
8 | //IOCTRL(inode * ,file * ,cmd ,arg ) | |
9 | ||
10 | ||
11 | //Structures | |
12 | typedef struct { | |
13 | //current position | |
14 | unsigned long u4CurrentPosition; | |
15 | //macro position | |
16 | unsigned long u4MacroPosition; | |
17 | //Infiniti position | |
18 | unsigned long u4InfPosition; | |
19 | //Motor Status | |
20 | bool bIsMotorMoving; | |
21 | //Motor Open? | |
22 | bool bIsMotorOpen; | |
23 | } stOV8825AF_MotorInfo; | |
24 | ||
25 | //Control commnad | |
26 | //S means "set through a ptr" | |
27 | //T means "tell by a arg value" | |
28 | //G means "get by a ptr" | |
29 | //Q means "get by return a value" | |
30 | //X means "switch G and S atomically" | |
31 | //H means "switch T and Q atomically" | |
32 | #define OV8825AFIOC_G_MOTORINFO _IOR(OV8825AF_MAGIC,0,stOV8825AF_MotorInfo) | |
33 | ||
34 | #define OV8825AFIOC_T_MOVETO _IOW(OV8825AF_MAGIC,1,unsigned long) | |
35 | ||
36 | #define OV8825AFIOC_T_SETINFPOS _IOW(OV8825AF_MAGIC,2,unsigned long) | |
37 | ||
38 | #define OV8825AFIOC_T_SETMACROPOS _IOW(OV8825AF_MAGIC,3,unsigned long) | |
39 | ||
40 | #else | |
41 | #endif |