rc-tbs-nec.c 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* tbs-nec.h - Keytable for tbs_nec Remote Controller
  2. *
  3. * keymap imported from ir-keymaps.c
  4. *
  5. * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #include <media/rc-map.h>
  13. static struct ir_scancode tbs_nec[] = {
  14. { 0x04, KEY_POWER2}, /*power*/
  15. { 0x14, KEY_MUTE}, /*mute*/
  16. { 0x07, KEY_1},
  17. { 0x06, KEY_2},
  18. { 0x05, KEY_3},
  19. { 0x0b, KEY_4},
  20. { 0x0a, KEY_5},
  21. { 0x09, KEY_6},
  22. { 0x0f, KEY_7},
  23. { 0x0e, KEY_8},
  24. { 0x0d, KEY_9},
  25. { 0x12, KEY_0},
  26. { 0x16, KEY_CHANNELUP}, /*ch+*/
  27. { 0x11, KEY_CHANNELDOWN},/*ch-*/
  28. { 0x13, KEY_VOLUMEUP}, /*vol+*/
  29. { 0x0c, KEY_VOLUMEDOWN},/*vol-*/
  30. { 0x03, KEY_RECORD}, /*rec*/
  31. { 0x18, KEY_PAUSE}, /*pause*/
  32. { 0x19, KEY_OK}, /*ok*/
  33. { 0x1a, KEY_CAMERA}, /* snapshot */
  34. { 0x01, KEY_UP},
  35. { 0x10, KEY_LEFT},
  36. { 0x02, KEY_RIGHT},
  37. { 0x08, KEY_DOWN},
  38. { 0x15, KEY_FAVORITES},
  39. { 0x17, KEY_SUBTITLE},
  40. { 0x1d, KEY_ZOOM},
  41. { 0x1f, KEY_EXIT},
  42. { 0x1e, KEY_MENU},
  43. { 0x1c, KEY_EPG},
  44. { 0x00, KEY_PREVIOUS},
  45. { 0x1b, KEY_MODE},
  46. };
  47. static struct rc_keymap tbs_nec_map = {
  48. .map = {
  49. .scan = tbs_nec,
  50. .size = ARRAY_SIZE(tbs_nec),
  51. .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
  52. .name = RC_MAP_TBS_NEC,
  53. }
  54. };
  55. static int __init init_rc_map_tbs_nec(void)
  56. {
  57. return ir_register_map(&tbs_nec_map);
  58. }
  59. static void __exit exit_rc_map_tbs_nec(void)
  60. {
  61. ir_unregister_map(&tbs_nec_map);
  62. }
  63. module_init(init_rc_map_tbs_nec)
  64. module_exit(exit_rc_map_tbs_nec)
  65. MODULE_LICENSE("GPL");
  66. MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");