diff options
Diffstat (limited to 'apps/keymaps/keymap-h1x0_h3x0.c')
-rw-r--r-- | apps/keymaps/keymap-h1x0_h3x0.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/apps/keymaps/keymap-h1x0_h3x0.c b/apps/keymaps/keymap-h1x0_h3x0.c index 0c0b61d201..af52b5c60d 100644 --- a/apps/keymaps/keymap-h1x0_h3x0.c +++ b/apps/keymaps/keymap-h1x0_h3x0.c | |||
@@ -259,6 +259,18 @@ const struct button_mapping button_context_keyboard[] = { | |||
259 | LAST_ITEM_IN_LIST | 259 | LAST_ITEM_IN_LIST |
260 | }; /* button_context_keyboard */ | 260 | }; /* button_context_keyboard */ |
261 | 261 | ||
262 | const struct button_mapping button_context_radio[] = { | ||
263 | { ACTION_FM_MENU, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_NONE }, | ||
264 | { ACTION_FM_PRESET, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT }, | ||
265 | { ACTION_FM_STOP, BUTTON_OFF, BUTTON_NONE }, | ||
266 | { ACTION_FM_MODE, BUTTON_ON | BUTTON_REPEAT, BUTTON_ON }, | ||
267 | { ACTION_FM_EXIT, BUTTON_MODE | BUTTON_REL, BUTTON_MODE }, | ||
268 | { ACTION_FM_PLAY, BUTTON_ON | BUTTON_REL, BUTTON_ON }, | ||
269 | |||
270 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | ||
271 | |||
272 | }; | ||
273 | |||
262 | /***************************************************************************** | 274 | /***************************************************************************** |
263 | * Remote control mappings | 275 | * Remote control mappings |
264 | *****************************************************************************/ | 276 | *****************************************************************************/ |
@@ -650,6 +662,21 @@ const struct button_mapping button_context_keyboard_h300lcdremote[] = { | |||
650 | LAST_ITEM_IN_LIST | 662 | LAST_ITEM_IN_LIST |
651 | }; /* button_context_keyboard_h300lcdremote */ | 663 | }; /* button_context_keyboard_h300lcdremote */ |
652 | 664 | ||
665 | const struct button_mapping button_context_radio_h100remote[] = { | ||
666 | { ACTION_FM_MENU, BUTTON_RC_MENU | BUTTON_REPEAT, BUTTON_NONE }, | ||
667 | { ACTION_FM_PRESET, BUTTON_RC_MENU | BUTTON_REL, BUTTON_RC_MENU }, | ||
668 | { ACTION_FM_STOP, BUTTON_RC_STOP, BUTTON_NONE }, | ||
669 | { ACTION_FM_MODE, BUTTON_RC_ON | BUTTON_REPEAT, BUTTON_RC_ON }, | ||
670 | { ACTION_FM_EXIT, BUTTON_RC_MODE | BUTTON_REL, BUTTON_RC_MODE }, | ||
671 | { ACTION_FM_PLAY, BUTTON_RC_ON | BUTTON_REL, BUTTON_RC_ON }, | ||
672 | { ACTION_FM_NEXT_PRESET, BUTTON_RC_BITRATE, BUTTON_NONE }, | ||
673 | { ACTION_FM_PREV_PRESET, BUTTON_RC_SOURCE, BUTTON_NONE }, | ||
674 | |||
675 | LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS) | ||
676 | }; | ||
677 | |||
678 | const struct button_mapping *button_context_radio_h300lcdremote = | ||
679 | button_context_radio_h100remote; | ||
653 | 680 | ||
654 | /* the actual used tables */ | 681 | /* the actual used tables */ |
655 | static const struct button_mapping | 682 | static const struct button_mapping |
@@ -667,6 +694,7 @@ static const struct button_mapping | |||
667 | *remote_btn_ctxt_pitchscreen = 0, | 694 | *remote_btn_ctxt_pitchscreen = 0, |
668 | *remote_btn_ctxt_recscreen = 0, | 695 | *remote_btn_ctxt_recscreen = 0, |
669 | *remote_btn_ctxt_keyboard = 0; | 696 | *remote_btn_ctxt_keyboard = 0; |
697 | *remote_btn_ctxt_radio = 0; | ||
670 | 698 | ||
671 | static int _remote_type = -1; /*safe value, forces the first press to init the mappings */ | 699 | static int _remote_type = -1; /*safe value, forces the first press to init the mappings */ |
672 | 700 | ||
@@ -690,6 +718,7 @@ static void remap_remote(void) | |||
690 | remote_btn_ctxt_pitchscreen = NULL; | 718 | remote_btn_ctxt_pitchscreen = NULL; |
691 | remote_btn_ctxt_recscreen = NULL; | 719 | remote_btn_ctxt_recscreen = NULL; |
692 | remote_btn_ctxt_keyboard = NULL; | 720 | remote_btn_ctxt_keyboard = NULL; |
721 | remote_btn_ctxt_radio = NULL; | ||
693 | break; | 722 | break; |
694 | 723 | ||
695 | case REMOTETYPE_H100_LCD: | 724 | case REMOTETYPE_H100_LCD: |
@@ -714,6 +743,8 @@ static void remap_remote(void) | |||
714 | = button_context_recscreen_h100remote, | 743 | = button_context_recscreen_h100remote, |
715 | remote_btn_ctxt_keyboard | 744 | remote_btn_ctxt_keyboard |
716 | = button_context_keyboard_h100remote; | 745 | = button_context_keyboard_h100remote; |
746 | remote_btn_ctxt_radio | ||
747 | = button_context_radio_h100remote; | ||
717 | break; | 748 | break; |
718 | 749 | ||
719 | case REMOTETYPE_H300_LCD: | 750 | case REMOTETYPE_H300_LCD: |
@@ -738,6 +769,8 @@ static void remap_remote(void) | |||
738 | = button_context_recscreen_h300lcdremote, | 769 | = button_context_recscreen_h300lcdremote, |
739 | remote_btn_ctxt_keyboard | 770 | remote_btn_ctxt_keyboard |
740 | = button_context_keyboard_h300lcdremote; | 771 | = button_context_keyboard_h300lcdremote; |
772 | remote_btn_ctxt_radio | ||
773 | = button_context_radio_h300lcdremote; | ||
741 | break; | 774 | break; |
742 | 775 | ||
743 | case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */ | 776 | case REMOTETYPE_H300_NONLCD: /* FIXME: add its tables */ |
@@ -762,6 +795,8 @@ static void remap_remote(void) | |||
762 | = button_context_recscreen_h300lcdremote, | 795 | = button_context_recscreen_h300lcdremote, |
763 | remote_btn_ctxt_keyboard | 796 | remote_btn_ctxt_keyboard |
764 | = button_context_keyboard_h300lcdremote; | 797 | = button_context_keyboard_h300lcdremote; |
798 | remote_btn_ctxt_radio | ||
799 | = button_context_radio_h300lcdremote; | ||
765 | #if 0 | 800 | #if 0 |
766 | remote_btn_ctxt_std = | 801 | remote_btn_ctxt_std = |
767 | remote_btn_ctxt_wps = | 802 | remote_btn_ctxt_wps = |
@@ -777,6 +812,7 @@ static void remap_remote(void) | |||
777 | remote_btn_ctxt_pitchscreen = | 812 | remote_btn_ctxt_pitchscreen = |
778 | remote_btn_ctxt_recscreen = | 813 | remote_btn_ctxt_recscreen = |
779 | remote_btn_ctxt_keyboard = | 814 | remote_btn_ctxt_keyboard = |
815 | remote_btn_ctxt_radio = | ||
780 | #endif | 816 | #endif |
781 | break; | 817 | break; |
782 | 818 | ||
@@ -827,6 +863,8 @@ const struct button_mapping* get_context_mapping_remote(int context) | |||
827 | return remote_btn_ctxt_recscreen; | 863 | return remote_btn_ctxt_recscreen; |
828 | case CONTEXT_KEYBOARD: | 864 | case CONTEXT_KEYBOARD: |
829 | return remote_btn_ctxt_keyboard; | 865 | return remote_btn_ctxt_keyboard; |
866 | case CONTEXT_FM: | ||
867 | return remote_btn_ctxt_radio; | ||
830 | } | 868 | } |
831 | return remote_btn_ctxt_std; | 869 | return remote_btn_ctxt_std; |
832 | } | 870 | } |
@@ -879,6 +917,8 @@ const struct button_mapping* get_context_mapping(int context) | |||
879 | return button_context_recscreen; | 917 | return button_context_recscreen; |
880 | case CONTEXT_KEYBOARD: | 918 | case CONTEXT_KEYBOARD: |
881 | return button_context_keyboard; | 919 | return button_context_keyboard; |
920 | case CONTEXT_FM: | ||
921 | return button_context_radio; | ||
882 | } | 922 | } |
883 | return button_context_standard; | 923 | return button_context_standard; |
884 | } | 924 | } |