diff options
author | tmk <nobody@nowhere> | 2011-05-21 10:28:57 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-05-21 10:28:57 +0900 |
commit | 74f7e19863ced21bf5d27c1fb1207f79f2195e24 (patch) | |
tree | c834e941748d6f4629b546bfce21fb9523d5e784 /keyboard.c | |
parent | 068c31a7ba9fc6aea33f69c0edb30ad195c320ec (diff) | |
download | firmware-74f7e19863ced21bf5d27c1fb1207f79f2195e24.tar.gz firmware-74f7e19863ced21bf5d27c1fb1207f79f2195e24.tar.bz2 firmware-74f7e19863ced21bf5d27c1fb1207f79f2195e24.zip |
added USB_EXTRA feature to HHKB/V-USB
Diffstat (limited to 'keyboard.c')
-rw-r--r-- | keyboard.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/keyboard.c b/keyboard.c index 03db3257a..fd6e23042 100644 --- a/keyboard.c +++ b/keyboard.c @@ -11,9 +11,7 @@ #ifdef MOUSEKEY_ENABLE #include "mousekey.h" #endif -/* TODO: shoud make new API */ #ifdef USB_EXTRA_ENABLE -#include "usb_extra.h" #include <util/delay.h> #endif @@ -68,23 +66,27 @@ void keyboard_proc(void) #ifdef USB_EXTRA_ENABLE // audio control & system control else if (code == KB_MUTE) { - usb_extra_audio_send(AUDIO_MUTE); - usb_extra_audio_send(0); + host_audio_send(AUDIO_MUTE); _delay_ms(500); + host_audio_send(0); } else if (code == KB_VOLU) { - usb_extra_audio_send(AUDIO_VOL_UP); - usb_extra_audio_send(0); + host_audio_send(AUDIO_VOL_UP); _delay_ms(200); + host_audio_send(0); } else if (code == KB_VOLD) { - usb_extra_audio_send(AUDIO_VOL_DOWN); - usb_extra_audio_send(0); + host_audio_send(AUDIO_VOL_DOWN); _delay_ms(200); + host_audio_send(0); } else if (code == KB_PWR) { +#ifdef HOST_PJRC if (suspend && remote_wakeup) { usb_remote_wakeup(); } else { - usb_extra_system_send(SYSTEM_POWER_DOWN); + host_system_send(SYSTEM_POWER_DOWN); } +#else + host_system_send(SYSTEM_POWER_DOWN); +#endif _delay_ms(1000); } #endif |