Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+
0002 //
0003 // Copyright (C) 2019 Christian Hewitt <christianshewitt@gmail.com>
0004 
0005 #include <media/rc-map.h>
0006 #include <linux/module.h>
0007 
0008 //
0009 // Keytable for the X96-max STB remote control
0010 //
0011 
0012 static struct rc_map_table x96max[] = {
0013     { 0x140, KEY_POWER },
0014 
0015     // ** TV CONTROL **
0016     // SET
0017     // AV/TV
0018     // POWER
0019     // VOLUME UP
0020     // VOLUME DOWN
0021 
0022     { 0x118, KEY_VOLUMEUP },
0023     { 0x110, KEY_VOLUMEDOWN },
0024 
0025     { 0x143, KEY_MUTE }, // config
0026 
0027     { 0x100, KEY_EPG }, // mouse
0028     { 0x119, KEY_BACK },
0029 
0030     { 0x116, KEY_UP },
0031     { 0x151, KEY_LEFT },
0032     { 0x150, KEY_RIGHT },
0033     { 0x11a, KEY_DOWN },
0034     { 0x113, KEY_OK },
0035 
0036     { 0x111, KEY_HOME },
0037     { 0x14c, KEY_CONTEXT_MENU },
0038 
0039     { 0x159, KEY_PREVIOUS },
0040     { 0x15a, KEY_PLAYPAUSE },
0041     { 0x158, KEY_NEXT },
0042 
0043     { 0x147, KEY_MENU }, // @ key
0044     { 0x101, KEY_NUMERIC_0 },
0045     { 0x142, KEY_BACKSPACE },
0046 
0047     { 0x14e, KEY_NUMERIC_1 },
0048     { 0x10d, KEY_NUMERIC_2 },
0049     { 0x10c, KEY_NUMERIC_3 },
0050 
0051     { 0x14a, KEY_NUMERIC_4 },
0052     { 0x109, KEY_NUMERIC_5 },
0053     { 0x108, KEY_NUMERIC_6 },
0054 
0055     { 0x146, KEY_NUMERIC_7 },
0056     { 0x105, KEY_NUMERIC_8 },
0057     { 0x104, KEY_NUMERIC_9 },
0058 };
0059 
0060 static struct rc_map_list x96max_map = {
0061     .map = {
0062         .scan     = x96max,
0063         .size     = ARRAY_SIZE(x96max),
0064         .rc_proto = RC_PROTO_NEC,
0065         .name     = RC_MAP_X96MAX,
0066     }
0067 };
0068 
0069 static int __init init_rc_map_x96max(void)
0070 {
0071     return rc_map_register(&x96max_map);
0072 }
0073 
0074 static void __exit exit_rc_map_x96max(void)
0075 {
0076     rc_map_unregister(&x96max_map);
0077 }
0078 
0079 module_init(init_rc_map_x96max)
0080 module_exit(exit_rc_map_x96max)
0081 
0082 MODULE_LICENSE("GPL");
0083 MODULE_AUTHOR("Christian Hewitt <christianshewitt@gmail.com");