• James Hogan's avatar
    [media] rc: ir-rc5-decoder: Add encode capability · a0466f15
    James Hogan authored
    Add the capability to encode RC-5, RC-5X and RC-5-SZ scancodes as raw
    events. The protocol is chosen based on the specified protocol mask,
    and whether all the required bits are set in the scancode mask, and
    none of the unused bits are set in the scancode data. For example a
    scancode filter with bit 16 set in both data and mask is unambiguously
    RC-5X.
    
    The Manchester modulation helper is used, and for RC-5X it is used twice
    with two sets of timings, the first with a short trailer space for the
    space in the middle, and the second with no leader so that it can
    continue the space.
    
    The encoding in RC-5-SZ first inserts a pulse and then simply utilizes
    the generic Manchester encoder available in rc-core.
    Signed-off-by: default avatarJames Hogan <james@albanarts.com>
    Signed-off-by: default avatarAntti Seppälä <a.seppala@gmail.com>
    Cc: David Härdeman <david@hardeman.nu>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    a0466f15
ir-rc5-decoder.c 8.81 KB