Skip to contentSkip to conversation

[4214] Add TSC2301 touchscreen & keypad controller.

Qemu-devel Andrzej Zaborowski 1 participant 1 message Apr 14, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4214

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4214
Author:   balrog
Date:     2008-04-14 21:28:11 +0000 (Mon, 14 Apr 2008)

Log Message:
-----------
Add TSC2301 touchscreen & keypad controller.

Add also a facility for setting up touchscreen calibration data per-board based on calibration data generated by tslib.

Modified Paths:
--------------

    trunk/console.h
    trunk/hw/devices.h
    trunk/hw/omap.h
    trunk/hw/tsc210x.c

Modified: trunk/console.h
===================================================================

console.h +8 -0
@@ -32,6 +32,14 @@
 void kbd_mouse_event(int dx, int dy, int dz, int buttons_state);
 int kbd_mouse_is_absolute(void);
 
+struct mouse_transform_info_s {
+    /* Touchscreen resolution */
+    int x;
+    int y;
+    /* Calibration values as used/generated by tslib */
+    int a[7];
+};
+
 void do_info_mice(void);
 void do_mouse_set(int index);
 

Modified: trunk/hw/devices.h
===================================================================

hw/devices.h +12 -0
@@ -16,6 +16,18 @@
 void ads7846_write(void *opaque, uint32_t value);
 struct ads7846_state_s *ads7846_init(qemu_irq penirq);
 
+/* tsc210x.c */
+struct uwire_slave_s;
+struct mouse_transform_info_s;
+struct uwire_slave_s *tsc2102_init(qemu_irq pint, AudioState *audio);
+struct uwire_slave_s *tsc2301_init(qemu_irq penirq, qemu_irq kbirq,
+                qemu_irq dav, AudioState *audio);
+struct i2s_codec_s *tsc210x_codec(struct uwire_slave_s *chip);
+uint32_t tsc210x_txrx(void *opaque, uint32_t value);
+void tsc210x_set_transform(struct uwire_slave_s *chip,
+                struct mouse_transform_info_s *info);
+void tsc210x_key_event(struct uwire_slave_s *chip, int key, int down);
+
 /* stellaris_input.c */
 void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode);
 

Modified: trunk/hw/omap.h
===================================================================

hw/omap.h +0 -6
@@ -1125,10 +1125,4 @@
 #  define cpu_register_io_memory	debug_register_io_memory
 # endif
 
-/* Not really omap specific, but is the only thing that uses the
-   uwire interface.  */
-/* tsc210x.c */
-struct uwire_slave_s *tsc2102_init(qemu_irq pint, AudioState *audio);
-struct i2s_codec_s *tsc210x_codec(struct uwire_slave_s *chip);
-
 #endif /* hw_omap_h */

Modified: trunk/hw/tsc210x.c
===================================================================

hw/tsc210x.c +270 -22

439 lines not on this page · raw message