aboutsummaryrefslogtreecommitdiff
path: root/hw/musicpal.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-08 22:45:01 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-08 22:45:01 +0000
commitc8256f9d23bba4fac3b0b6a9e6e3dc12362cbe0b (patch)
tree5d698284ac48ee79c1ac0da2552d4e2af7fd08bb /hw/musicpal.c
parent7dd9e556e396a6c12a1d31e53ba98a2a90c4e73d (diff)
Enhance sendkey with key hold time (Jan Kiszka).
Current key injection via the monitor basically generates no key hold time. This is fine for keyboard emulations that have their own queues, but it causes troubles for those how don't (like the MusicPal - it simply does not work with injected keys). Moreover, I would like to use this mechanism to simulate pressed buttons during power-up. Therefore, this patch enhances the key injection with a configurable release delay (by default 100 virtual milliseconds). This feature allows to get rid of the initial sleep() in musicpal_init because one can now simply start qemu with -S and issue "sendkey m 1000" and "continue" in the monitor to achieve the desired effect of a pressed menu button during power-up. So there is no need for a per-musicpal or even qemu-wide "-hold-button" switch. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4701 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r--hw/musicpal.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c
index 211c84936c..b0fcee25be 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -1504,12 +1504,6 @@ static void musicpal_init(ram_addr_t ram_size, int vga_ram_size,
qemu_add_kbd_event_handler(musicpal_key_event, pic[MP_GPIO_IRQ]);
- /*
- * Wait a bit to catch menu button during U-Boot start-up
- * (to trigger emergency update).
- */
- sleep(1);
-
mv88w8618_eth_init(&nd_table[0], MP_ETH_BASE, pic[MP_ETH_IRQ]);
mixer_i2c = musicpal_audio_init(MP_AUDIO_BASE, pic[MP_AUDIO_IRQ]);