# contributed by Cory Sharp <cssharp@mail.com>
# date 28 Jan 2007
#
# brand: DirecTV
# model no. of remote control: RC24
# devices being controlled by this remote: DirecTV H20 receiver
#
# Manufacturer code used for DirecTV: 00001 (DirecTV model D-10)
# Manufacturer code used for TV: 10000 (Supreme)
#
# To configure manufacturer codes for the remote, slide the switch to DirecTV
# or TV as appropriate, then hold mute and select until the LED blinks twice.
# Enter the five digit code -- success is indicated by two blinks after
# pressing the 5th digit.  Note: I could not find a TV code that enabled the
# tv-input button.
#
# The DirecTV RC24 RF protocol is currently unsupported by lirc.  If I
# understand it correctly: a zero bit is encoded a single 600us pulse or space,
# and a one bit is encoded as single 1200us pulse or space.  The initial button
# press has a 6000us pulse 1200us space header, and repeats have a 3000us pulse
# 1200us space header.  Buttons end in a 600us tail and have a 30000us gap.  A
# subset of the buttons emit a different code if held for about 42 repetitions,
# configured here as button names ending in -long.  Buttons specialized for the
# TV first triply emit a prelude button code in the DirecTV protocol, then the
# button code for the relevant TV.
#
# If LIRC supported this particular bit encoding, and if I understand the
# lircd.conf format correctly, this configuration would look something like:
#
# begin remote
#   gap 30000
#   header 6000 1200
#   repeat 3000 1200
#   ptrail 600
#   flags TIME_ENC
#   zero_duration 600
#   one_duration 1200
#   pre_data_bits 4
#   pre_data 0x0c
#   bits 12
#   begin codes
#     format 0x739
#     format-long 0x75a
#     ...
#   end codes
# end remote
#
# Note: I couldn't get lirc (version 0.8.1) to understand the 6000us header on
# the first button press, so the first button press is dropped, only repeats
# are recorded.

begin remote

  name  DirecTV_RC24
  flags RAW_CODES
  eps 30
  aeps 100

  gap 30000

      begin raw_codes

          name format
             3000    1200    1200    1200     600     600
              600    1200    1200    1200     600     600
             1200    1200    1200     600     600    1200
              600

          name format-long
             3000    1200    1200    1200     600     600
              600    1200    1200    1200     600    1200
              600    1200    1200     600    1200     600
              600

          name power
             3000    1200    1200    1200     600     600
              600     600     600    1200     600     600
              600     600     600    1200     600    1200
              600

          name tv-power-on
             3000    1200    1200    1200     600     600
             1200     600     600     600     600     600
              600     600    1200    1200    1200     600
              600

          name tv-power-on-special
             2400     600     600     600    1200     600
             1200     600    1200     600     600     600
             1200     600     600     600    1200     600
              600     600     600     600     600     600
              600

          name tv-power-off
             3000    1200    1200    1200     600     600
             1200     600     600     600     600     600
              600    1200    1200    1200    1200    1200
              600

          name tv-power-off-special
             2400     600    1200     600    1200     600
             1200     600    1200     600     600     600
             1200     600     600     600    1200     600
              600     600     600     600     600     600
              600

          name rewind
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600     600
             1200    1200     600     600    1200     600
              600

          name rewind-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200    1200
              600     600    1200     600     600     600
              600

          name play
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600     600
              600     600    1200    1200    1200    1200
              600

          name play-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200     600
             1200     600     600    1200    1200    1200
              600

          name forward
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600    1200
              600     600     600     600    1200     600
              600

          name forward-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200    1200
              600    1200    1200     600     600    1200
              600

          name stop
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600     600
              600    1200     600     600     600     600
              600

          name skip-back
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600    1200
             1200     600     600    1200     600     600
              600

          name skip-back-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200    1200
             1200    1200    1200     600    1200    1200
              600

          name skip-forward
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600    1200
             1200    1200     600    1200     600    1200
              600

          name skip-forward-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200     600
              600     600     600    1200     600    1200
              600

          name pause
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600     600
             1200     600     600     600     600    1200
              600

          name pause-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200     600
             1200    1200    1200     600     600     600
              600

          name record
             3000    1200    1200    1200     600     600
              600     600    1200    1200     600    1200
              600    1200     600     600    1200    1200
              600

          name record-long
             3000    1200    1200    1200     600     600
              600     600    1200    1200    1200    1200
             1200     600    1200     600    1200     600
              600

          name guide
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200     600
              600     600     600     600     600     600
              600

          name guide-long
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200    1200
              600    1200     600    1200     600     600
              600

          name active
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200     600
              600    1200     600     600     600    1200
              600

          name list
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200     600
             1200     600     600     600    1200     600
              600

          name list-long
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200     600
             1200    1200     600     600    1200    1200
              600

          name exit
             3000    1200    1200    1200     600     600
              600     600    1200     600     600    1200
             1200     600    1200    1200    1200    1200
              600

          name up
             3000    1200    1200    1200     600     600
              600     600    1200     600     600     600
              600    1200    1200     600    1200    1200
              600

          name down
             3000    1200    1200    1200     600     600
              600     600    1200     600     600     600
             1200     600    1200    1200     600     600
              600

          name left
             3000    1200    1200    1200     600     600
              600     600    1200     600     600     600
             1200    1200    1200    1200     600    1200
              600

          name right
             3000    1200    1200    1200     600     600
              600     600    1200     600     600    1200
              600     600    1200    1200     600    1200
              600

          name select
             3000    1200    1200    1200     600     600
              600     600    1200     600     600    1200
              600    1200    1200    1200    1200     600
              600

          name back
             3000    1200    1200    1200     600     600
              600     600    1200     600     600    1200
             1200    1200     600     600     600     600
              600

          name menu
             3000    1200    1200    1200     600     600
              600     600    1200     600     600     600
              600     600    1200     600    1200     600
              600

          name info
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200    1200
             1200     600     600    1200     600    1200
              600

          name info-long
             3000    1200    1200    1200     600     600
              600     600    1200     600    1200    1200
              600     600     600     600    1200    1200
              600

          name red
             3000    1200    1200    1200     600     600
              600    1200     600     600     600     600
              600    1200    1200     600     600     600
              600

          name red-long
             3000    1200    1200    1200     600     600
              600    1200     600     600    1200     600
             1200     600    1200    1200    1200    1200
              600

          name green
             3000    1200    1200    1200     600     600
              600    1200     600     600     600     600
             1200    1200    1200     600    1200     600
              600

          name green-long
             3000    1200    1200    1200     600     600
              600    1200     600     600    1200    1200
              600     600     600     600     600     600
              600

          name yellow
             3000    1200    1200    1200     600     600
              600    1200     600     600     600     600
             1200     600    1200     600     600    1200
              600

          name yellow-long
             3000    1200    1200    1200     600     600
              600    1200     600     600    1200     600
             1200    1200     600     600     600     600
              600

          name blue
             3000    1200    1200    1200     600     600
              600    1200     600     600     600    1200
              600     600    1200     600    1200     600
              600

          name blue-long
             3000    1200    1200    1200     600     600
              600    1200     600     600    1200    1200
              600    1200     600     600     600    1200
              600

          name volume-prelude
             3000    1200    1200    1200     600     600
              600    1200     600    1200    1200     600
              600    1200     600     600    1200    1200
              600

          name volume-up
             2400     600     600     600    1200     600
              600     600     600     600    1200     600
              600     600     600     600    1200     600
              600     600     600     600     600     600
              600

          name volume-down
             2400     600    1200     600    1200     600
              600     600     600     600    1200     600
              600     600     600     600    1200     600
              600     600     600     600     600     600
              600

          name mute
             2400     600     600     600     600     600
             1200     600     600     600    1200     600
              600     600     600     600    1200     600
              600     600     600     600     600     600
              600

          name channel-up
             3000    1200    1200    1200     600     600
              600     600     600     600    1200    1200
              600    1200    1200     600    1200     600
              600

          name channel-down
             3000    1200    1200    1200     600     600
              600     600     600     600    1200    1200
             1200     600    1200     600    1200    1200
              600

          name prev
             3000    1200    1200    1200     600     600
              600     600     600     600    1200    1200
             1200    1200    1200    1200     600     600
              600

          name 1
             3000    1200    1200    1200     600     600
              600     600     600     600     600     600
              600    1200     600     600     600    1200
              600

          name 2
             3000    1200    1200    1200     600     600
              600     600     600     600     600     600
             1200     600     600     600    1200     600
              600

          name 3
             3000    1200    1200    1200     600     600
              600     600     600     600     600     600
             1200    1200     600     600    1200    1200
              600

          name 4
             3000    1200    1200    1200     600     600
              600     600     600     600     600    1200
              600     600     600     600    1200    1200
              600

          name 5
             3000    1200    1200    1200     600     600
              600     600     600     600     600    1200
              600    1200     600    1200     600     600
              600

          name 6
             3000    1200    1200    1200     600     600
              600     600     600     600     600    1200
             1200     600     600    1200     600    1200
              600

          name 7
             3000    1200    1200    1200     600     600
              600     600     600     600     600    1200
             1200    1200     600    1200    1200     600
              600

          name 8
             3000    1200    1200    1200     600     600
              600     600     600     600    1200     600
              600     600     600    1200    1200     600
              600

          name 9
             3000    1200    1200    1200     600     600
              600     600     600     600    1200     600
              600    1200     600    1200    1200    1200
              600

          name dash
             3000    1200    1200    1200     600     600
              600     600     600    1200     600     600
             1200     600     600    1200    1200    1200
              600

          name 0
             3000    1200    1200    1200     600     600
              600     600     600    1200     600     600
              600    1200     600    1200    1200     600
              600

          name enter
             3000    1200    1200    1200     600     600
              600     600     600    1200     600     600
             1200    1200    1200     600     600     600
              600

      end raw_codes

end remote

