summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 648a7e6cae..6a40d4b54a 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -112,13 +112,6 @@
112#include "as3514.h" 112#include "as3514.h"
113#endif 113#endif
114 114
115#ifdef HAVE_USBSTACK
116#include "usb_core.h"
117#ifdef USB_ENABLE_HID
118#include "usbstack/usb_hid.h"
119#endif
120#endif
121
122/*---------------------------------------------------*/ 115/*---------------------------------------------------*/
123/* SPECIAL DEBUG STUFF */ 116/* SPECIAL DEBUG STUFF */
124/*---------------------------------------------------*/ 117/*---------------------------------------------------*/
@@ -2635,50 +2628,6 @@ static bool toggle_usb_serial(void)
2635} 2628}
2636#endif 2629#endif
2637 2630
2638#ifdef USB_ENABLE_HID
2639static bool hid_send_cmd(consumer_usage_page_t cmd, char *msg)
2640{
2641 (void)msg;
2642
2643 if (!usb_core_driver_enabled(USB_DRIVER_HID)) {
2644 splashf(HZ, "Send failed. Driver is disabled");
2645 return false;
2646 }
2647
2648 usb_hid_send_consumer_usage(cmd);
2649 logf("Sent %s command", msg);
2650
2651 return false;
2652}
2653static bool usb_hid_send_play_pause(void)
2654{
2655 return hid_send_cmd(PLAY_PAUSE, "Play/Pause");
2656}
2657static bool usb_hid_send_stop(void)
2658{
2659 return hid_send_cmd(STOP, "Stop");
2660}
2661static bool usb_hid_send_scan_previous_track(void)
2662{
2663 return hid_send_cmd(SCAN_PREVIOUS_TRACK, "Scan previous track");
2664}
2665static bool usb_hid_send_scan_next_track(void)
2666{
2667 return hid_send_cmd(SCAN_NEXT_TRACK, "Scan next track");
2668}
2669static bool usb_hid_send_mute(void)
2670{
2671 return hid_send_cmd(MUTE, "Mute");
2672}
2673static bool usb_hid_send_volume_decrement(void)
2674{
2675 return hid_send_cmd(VOLUME_DECREMENT, "Vol Down");
2676}
2677static bool usb_hid_send_volume_increment(void)
2678{
2679 return hid_send_cmd(VOLUME_INCREMENT, "Vol Up");
2680}
2681#endif
2682#endif 2631#endif
2683 2632
2684#if CONFIG_USBOTG == USBOTG_ISP1583 2633#if CONFIG_USBOTG == USBOTG_ISP1583
@@ -2819,15 +2768,6 @@ static const struct the_menu_item menuitems[] = {
2819#if defined(ROCKBOX_HAS_LOGF) && defined(USB_ENABLE_SERIAL) 2768#if defined(ROCKBOX_HAS_LOGF) && defined(USB_ENABLE_SERIAL)
2820 {"USB Serial driver (logf)", toggle_usb_serial }, 2769 {"USB Serial driver (logf)", toggle_usb_serial },
2821#endif 2770#endif
2822#if defined(USB_ENABLE_HID)
2823 {"USB HID play/pause", usb_hid_send_play_pause },
2824 {"USB HID stop", usb_hid_send_stop },
2825 {"USB HID prev track", usb_hid_send_scan_previous_track },
2826 {"USB HID next track", usb_hid_send_scan_next_track },
2827 {"USB HID mute", usb_hid_send_mute },
2828 {"USB HID vol down", usb_hid_send_volume_decrement },
2829 {"USB HID vol up", usb_hid_send_volume_increment },
2830#endif
2831#endif /* HAVE_USBSTACK */ 2771#endif /* HAVE_USBSTACK */
2832#ifdef CPU_BOOST_LOGGING 2772#ifdef CPU_BOOST_LOGGING
2833 {"cpu_boost log",cpu_boost_log}, 2773 {"cpu_boost log",cpu_boost_log},