Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 //
0003 // Copyright (C) 2021 Christian Hewitt <christianshewitt@gmail.com>
0004 
0005 #include <media/rc-map.h>
0006 #include <linux/module.h>
0007 
0008 //
0009 // Keytable for the Mecool Kiii Pro remote control
0010 //
0011 
0012 static struct rc_map_table mecool_kiii_pro[] = {
0013     { 0x59, KEY_POWER },
0014 
0015     { 0x52, KEY_1 },
0016     { 0x50, KEY_2 },
0017     { 0x10, KEY_3 },
0018     { 0x56, KEY_4 },
0019     { 0x54, KEY_5 },
0020     { 0x14, KEY_6 },
0021     { 0x4e, KEY_7 },
0022     { 0x4c, KEY_8 },
0023     { 0x0c, KEY_9 },
0024     { 0x02, KEY_INFO },
0025     { 0x0f, KEY_0 },
0026     { 0x51, KEY_DELETE },
0027     { 0x1f, KEY_FAVORITES},
0028     { 0x09, KEY_SUBTITLE },
0029     { 0x01, KEY_LANGUAGE }, // AUDIO
0030 
0031     { 0x42, KEY_RED },
0032     { 0x40, KEY_GREEN },
0033     { 0x00, KEY_YELLOW},
0034     { 0x03, KEY_BLUE }, // RADIO
0035 
0036     { 0x0d, KEY_HOME },
0037     { 0x4d, KEY_EPG },
0038     { 0x45, KEY_MENU },
0039     { 0x05, KEY_EXIT },
0040 
0041     { 0x5a, KEY_LEFT },
0042     { 0x1b, KEY_RIGHT },
0043     { 0x06, KEY_UP },
0044     { 0x16, KEY_DOWN },
0045     { 0x1a, KEY_OK },
0046 
0047     { 0x13, KEY_VOLUMEUP },
0048     { 0x17, KEY_VOLUMEDOWN },
0049     { 0x19, KEY_MUTE },
0050     { 0x12, KEY_CONTEXT_MENU }, // MOUSE
0051     { 0x55, KEY_CHANNELUP }, // PAGE_UP
0052     { 0x15, KEY_CHANNELDOWN }, // PAGE_DOWN
0053 
0054     { 0x4a, KEY_REWIND },
0055     { 0x48, KEY_FORWARD },
0056     { 0x46, KEY_PLAYPAUSE },
0057     { 0x44, KEY_STOP },
0058 
0059     { 0x08, KEY_PREVIOUSSONG},
0060     { 0x0b, KEY_NEXTSONG},
0061     { 0x04, KEY_PVR },
0062     { 0x64, KEY_RECORD },
0063 };
0064 
0065 static struct rc_map_list mecool_kiii_pro_map = {
0066     .map = {
0067         .scan     = mecool_kiii_pro,
0068         .size     = ARRAY_SIZE(mecool_kiii_pro),
0069         .rc_proto = RC_PROTO_NEC,
0070         .name     = RC_MAP_MECOOL_KIII_PRO,
0071     }
0072 };
0073 
0074 static int __init init_rc_map_mecool_kiii_pro(void)
0075 {
0076     return rc_map_register(&mecool_kiii_pro_map);
0077 }
0078 
0079 static void __exit exit_rc_map_mecool_kiii_pro(void)
0080 {
0081     rc_map_unregister(&mecool_kiii_pro_map);
0082 }
0083 
0084 module_init(init_rc_map_mecool_kiii_pro)
0085 module_exit(exit_rc_map_mecool_kiii_pro)
0086 
0087 MODULE_LICENSE("GPL");
0088 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");