Go to the documentation of this file.
10 #ifndef _BFIN_ROTARY_H
11 #define _BFIN_ROTARY_H
14 #define ROT_QUAD_ENC CNTMODE_QUADENC
15 #define ROT_BIN_ENC CNTMODE_BINENC
16 #define ROT_UD_CNT CNTMODE_UDCNT
17 #define ROT_DIR_CNT CNTMODE_DIRCNT
21 #define ROT_CDGINV CDGINV
22 #define ROT_CUDINV CUDINV
23 #define ROT_CZMINV CZMINV
48 #define CDGINV (1 << 4)
49 #define CUDINV (1 << 5)
50 #define CZMINV (1 << 6)
51 #define CNTMODE_SHIFT 8
52 #define CNTMODE (0x7 << CNTMODE_SHIFT)
54 #define BNDMODE_SHIFT 12
55 #define BNDMODE (0x3 << BNDMODE_SHIFT)
56 #define INPDIS (1 << 15)
58 #define CNTMODE_QUADENC (0 << CNTMODE_SHIFT)
59 #define CNTMODE_BINENC (1 << CNTMODE_SHIFT)
60 #define CNTMODE_UDCNT (2 << CNTMODE_SHIFT)
61 #define CNTMODE_DIRCNT (4 << CNTMODE_SHIFT)
62 #define CNTMODE_DIRTMR (5 << CNTMODE_SHIFT)
64 #define BNDMODE_COMP (0 << BNDMODE_SHIFT)
65 #define BNDMODE_ZERO (1 << BNDMODE_SHIFT)
66 #define BNDMODE_CAPT (2 << BNDMODE_SHIFT)
67 #define BNDMODE_AEXT (3 << BNDMODE_SHIFT)
73 #define MINCIE (1 << 3)
74 #define MAXCIE (1 << 4)
75 #define COV31IE (1 << 5)
76 #define COV15IE (1 << 6)
77 #define CZEROIE (1 << 7)
78 #define CZMIE (1 << 8)
79 #define CZMEIE (1 << 9)
80 #define CZMZIE (1 << 10)
86 #define MINCII (1 << 3)
87 #define MAXCII (1 << 4)
88 #define COV31II (1 << 5)
89 #define COV15II (1 << 6)
90 #define CZEROII (1 << 7)
91 #define CZMII (1 << 8)
92 #define CZMEII (1 << 9)
93 #define CZMZII (1 << 10)
99 #define W1ZMONCE (1 << 12)
101 #define W1LCNT_ZERO (1 << 0)
102 #define W1LCNT_MIN (1 << 2)
103 #define W1LCNT_MAX (1 << 3)
105 #define W1LMIN_ZERO (1 << 4)
106 #define W1LMIN_CNT (1 << 5)
107 #define W1LMIN_MAX (1 << 7)
109 #define W1LMAX_ZERO (1 << 8)
110 #define W1LMAX_CNT (1 << 9)
111 #define W1LMAX_MIN (1 << 10)
114 #define DPRESCALE 0xf