Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. /* Keytable for A5X IR Remote Controller
  2. *
  3. * Copyright (c) 2019 madmalkav
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. * NOTE: the remote have a MOUSE button, I have mapped it for MUTE
  10. */
  11.  
  12. #include <media/rc-map.h>
  13. #include <linux/module.h>
  14.  
  15. static struct rc_map_table a5x[] = {
  16. { 0x8081, KEY_POWER },
  17. { 0x8083, KEY_MENU },
  18. { 0x8038, KEY_UP },
  19. { 0x8040, KEY_DOWN },
  20. { 0x8037, KEY_LEFT },
  21. { 0x8039, KEY_RIGHT },
  22. { 0x8013, KEY_OK },
  23. { 0x8089, KEY_VOLUMEDOWN },
  24. { 0x8048, KEY_MUTE },
  25. { 0x8087, KEY_VOLUMEUP },
  26. { 0x8027, KEY_BACK },
  27. { 0x8073, KEY_HOME },
  28. };
  29.  
  30. static struct rc_map_list a5x_map = {
  31. .map = {
  32. .scan = a5x,
  33. .size = ARRAY_SIZE(a5x),
  34. .rc_type = RC_TYPE_NEC,
  35. .name = RC_MAP_A5X,
  36. }
  37. };
  38.  
  39. static int __init init_rc_map_a5x(void)
  40. {
  41. return rc_map_register(&a5x_map);
  42. }
  43.  
  44. static void __exit exit_rc_map_a5x(void)
  45. {
  46. rc_map_unregister(&a5x_map);
  47. }
  48.  
  49. module_init(init_rc_map_a5x)
  50. module_exit(exit_rc_map_a5x)
  51.  
  52. MODULE_LICENSE("GPL");
  53. MODULE_AUTHOR("madmalkav");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement