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 Kii Pro remote control
0010 //
0011 
0012 static struct rc_map_table mecool_kii_pro[] = {
0013     { 0x59, KEY_POWER },
0014     { 0x19, KEY_MUTE },
0015 
0016     { 0x42, KEY_RED },
0017     { 0x40, KEY_GREEN },
0018     { 0x00, KEY_YELLOW},
0019     { 0x03, KEY_BLUE },
0020 
0021     { 0x4a, KEY_REWIND },
0022     { 0x48, KEY_FORWARD },
0023     { 0x08, KEY_PREVIOUSSONG},
0024     { 0x0b, KEY_NEXTSONG},
0025 
0026     { 0x46, KEY_PLAYPAUSE },
0027     { 0x44, KEY_STOP },
0028     { 0x1f, KEY_FAVORITES},
0029     { 0x04, KEY_PVR },
0030 
0031     { 0x4d, KEY_EPG },
0032     { 0x02, KEY_INFO },
0033     { 0x09, KEY_SUBTITLE },
0034     { 0x01, KEY_LANGUAGE }, // AUDIO
0035 
0036     { 0x0d, KEY_HOME },
0037     { 0x11, KEY_TV },
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     { 0x58, KEY_APPSELECT }, // APPS
0050     { 0x12, KEY_CONTEXT_MENU }, // MOUSE
0051     { 0x55, KEY_CHANNELUP }, // PAGE_UP
0052     { 0x15, KEY_CHANNELDOWN }, // PAGE_DOWN
0053 
0054     { 0x52, KEY_1 },
0055     { 0x50, KEY_2 },
0056     { 0x10, KEY_3 },
0057     { 0x56, KEY_4 },
0058     { 0x54, KEY_5 },
0059     { 0x14, KEY_6 },
0060     { 0x4e, KEY_7 },
0061     { 0x4c, KEY_8 },
0062     { 0x0c, KEY_9 },
0063     { 0x18, KEY_WWW },
0064     { 0x0f, KEY_0 },
0065     { 0x51, KEY_DELETE },
0066 };
0067 
0068 static struct rc_map_list mecool_kii_pro_map = {
0069     .map = {
0070         .scan     = mecool_kii_pro,
0071         .size     = ARRAY_SIZE(mecool_kii_pro),
0072         .rc_proto = RC_PROTO_NEC,
0073         .name     = RC_MAP_MECOOL_KII_PRO,
0074     }
0075 };
0076 
0077 static int __init init_rc_map_mecool_kii_pro(void)
0078 {
0079     return rc_map_register(&mecool_kii_pro_map);
0080 }
0081 
0082 static void __exit exit_rc_map_mecool_kii_pro(void)
0083 {
0084     rc_map_unregister(&mecool_kii_pro_map);
0085 }
0086 
0087 module_init(init_rc_map_mecool_kii_pro)
0088 module_exit(exit_rc_map_mecool_kii_pro)
0089 
0090 MODULE_LICENSE("GPL");
0091 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");