diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:14:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-06 20:14:01 -0500 |
commit | db30c70575822cc84d87b5613c19cac24734b99f (patch) | |
tree | 82945ad5813bfe6633698233981d270b5f0a310b /Documentation | |
parent | c861ea2cb2c25c1698734d9b0540a09e253690a1 (diff) | |
parent | 9334e90d5ac5ee1fa6d8b75acb7c64a8907787d1 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits)
Input: i8042 - add Dell Vostro 1510 to nomux list
Input: gtco - use USB endpoint API
Input: add support for Maple controller as a joystick
Input: atkbd - broaden the Dell DMI signatures
Input: HIL drivers - add MODULE_ALIAS()
Input: map_to_7segment.h - convert to __inline__ for userspace
Input: add support for enhanced rotary controller on pxa930 and pxa935
Input: add support for trackball on pxa930 and pxa935
Input: add da9034 touchscreen support
Input: ads7846 - strict_strtoul takes unsigned long
Input: make some variables and functions static
Input: add tsc2007 based touchscreen driver
Input: psmouse - add module parameters to control OLPC touchpad delays
Input: i8042 - add Gigabyte M912 netbook to noloop exception table
Input: atkbd - Samsung NC10 key repeat fix
Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop
Input: libps2 - handle 0xfc responses from devices
Input: add support for Wacom W8001 penabled serial touchscreen
Input: synaptics - report multi-taps only if supported by the device
Input: add joystick driver for Walkera WK-0701 RC transmitter
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/input/walkera0701.txt | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/Documentation/input/walkera0701.txt b/Documentation/input/walkera0701.txt new file mode 100644 index 000000000000..8f4289efc5c4 --- /dev/null +++ b/Documentation/input/walkera0701.txt | |||
@@ -0,0 +1,109 @@ | |||
1 | |||
2 | Walkera WK-0701 transmitter is supplied with a ready to fly Walkera | ||
3 | helicopters such as HM36, HM37, HM60. The walkera0701 module enables to use | ||
4 | this transmitter as joystick | ||
5 | |||
6 | Devel homepage and download: | ||
7 | http://zub.fei.tuke.sk/walkera-wk0701/ | ||
8 | |||
9 | or use cogito: | ||
10 | cg-clone http://zub.fei.tuke.sk/GIT/walkera0701-joystick | ||
11 | |||
12 | |||
13 | Connecting to PC: | ||
14 | |||
15 | At back side of transmitter S-video connector can be found. Modulation | ||
16 | pulses from processor to HF part can be found at pin 2 of this connector, | ||
17 | pin 3 is GND. Between pin 3 and CPU 5k6 resistor can be found. To get | ||
18 | modulation pulses to PC, signal pulses must be amplified. | ||
19 | |||
20 | Cable: (walkera TX to parport) | ||
21 | |||
22 | Walkera WK-0701 TX S-VIDEO connector: | ||
23 | (back side of TX) | ||
24 | __ __ S-video: canon25 | ||
25 | / |_| \ pin 2 (signal) NPN parport | ||
26 | / O 4 3 O \ pin 3 (GND) LED ________________ 10 ACK | ||
27 | ( O 2 1 O ) | C | ||
28 | \ ___ / 2 ________________________|\|_____|/ | ||
29 | | [___] | |/| B |\ | ||
30 | ------- 3 __________________________________|________________ 25 GND | ||
31 | E | ||
32 | |||
33 | |||
34 | I use green LED and BC109 NPN transistor. | ||
35 | |||
36 | Software: | ||
37 | |||
38 | Build kernel with walkera0701 module. Module walkera0701 need exclusive | ||
39 | access to parport, modules like lp must be unloaded before loading | ||
40 | walkera0701 module, check dmesg for error messages. Connect TX to PC by | ||
41 | cable and run jstest /dev/input/js0 to see values from TX. If no value can | ||
42 | be changed by TX "joystick", check output from /proc/interrupts. Value for | ||
43 | (usually irq7) parport must increase if TX is on. | ||
44 | |||
45 | |||
46 | |||
47 | Technical details: | ||
48 | |||
49 | Driver use interrupt from parport ACK input bit to measure pulse length | ||
50 | using hrtimers. | ||
51 | |||
52 | Frame format: | ||
53 | Based on walkera WK-0701 PCM Format description by Shaul Eizikovich. | ||
54 | (downloaded from http://www.smartpropoplus.com/Docs/Walkera_Wk-0701_PCM.pdf) | ||
55 | |||
56 | Signal pulses: | ||
57 | (ANALOG) | ||
58 | SYNC BIN OCT | ||
59 | +---------+ +------+ | ||
60 | | | | | | ||
61 | --+ +------+ +--- | ||
62 | |||
63 | Frame: | ||
64 | SYNC , BIN1, OCT1, BIN2, OCT2 ... BIN24, OCT24, BIN25, next frame SYNC .. | ||
65 | |||
66 | pulse length: | ||
67 | Binary values: Analog octal values: | ||
68 | |||
69 | 288 uS Binary 0 318 uS 000 | ||
70 | 438 uS Binary 1 398 uS 001 | ||
71 | 478 uS 010 | ||
72 | 558 uS 011 | ||
73 | 638 uS 100 | ||
74 | 1306 uS SYNC 718 uS 101 | ||
75 | 798 uS 110 | ||
76 | 878 uS 111 | ||
77 | |||
78 | 24 bin+oct values + 1 bin value = 24*4+1 bits = 97 bits | ||
79 | |||
80 | (Warning, pulses on ACK ar inverted by transistor, irq is rised up on sync | ||
81 | to bin change or octal value to bin change). | ||
82 | |||
83 | Binary data representations: | ||
84 | |||
85 | One binary and octal value can be grouped to nibble. 24 nibbles + one binary | ||
86 | values can be sampled between sync pulses. | ||
87 | |||
88 | Values for first four channels (analog joystick values) can be found in | ||
89 | first 10 nibbles. Analog value is represented by one sign bit and 9 bit | ||
90 | absolute binary value. (10 bits per channel). Next nibble is checksum for | ||
91 | first ten nibbles. | ||
92 | |||
93 | Next nibbles 12 .. 21 represents four channels (not all channels can be | ||
94 | directly controlled from TX). Binary representations ar the same as in first | ||
95 | four channels. In nibbles 22 and 23 is a special magic number. Nibble 24 is | ||
96 | checksum for nibbles 12..23. | ||
97 | |||
98 | After last octal value for nibble 24 and next sync pulse one additional | ||
99 | binary value can be sampled. This bit and magic number is not used in | ||
100 | software driver. Some details about this magic numbers can be found in | ||
101 | Walkera_Wk-0701_PCM.pdf. | ||
102 | |||
103 | Checksum calculation: | ||
104 | |||
105 | Summary of octal values in nibbles must be same as octal value in checksum | ||
106 | nibble (only first 3 bits are used). Binary value for checksum nibble is | ||
107 | calculated by sum of binary values in checked nibbles + sum of octal values | ||
108 | in checked nibbles divided by 8. Only bit 0 of this sum is used. | ||
109 | |||