infrared_protocol_kaseikyo.c 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #include "infrared_protocol_kaseikyo_i.h"
  2. const InfraredCommonProtocolSpec infrared_protocol_kaseikyo = {
  3. .timings =
  4. {
  5. .preamble_mark = INFRARED_KASEIKYO_PREAMBLE_MARK,
  6. .preamble_space = INFRARED_KASEIKYO_PREAMBLE_SPACE,
  7. .bit1_mark = INFRARED_KASEIKYO_BIT1_MARK,
  8. .bit1_space = INFRARED_KASEIKYO_BIT1_SPACE,
  9. .bit0_mark = INFRARED_KASEIKYO_BIT0_MARK,
  10. .bit0_space = INFRARED_KASEIKYO_BIT0_SPACE,
  11. .preamble_tolerance = INFRARED_KASEIKYO_PREAMBLE_TOLERANCE,
  12. .bit_tolerance = INFRARED_KASEIKYO_BIT_TOLERANCE,
  13. .silence_time = INFRARED_KASEIKYO_SILENCE,
  14. .min_split_time = INFRARED_KASEIKYO_MIN_SPLIT_TIME,
  15. },
  16. .databit_len[0] = 48,
  17. .no_stop_bit = false,
  18. .decode = infrared_common_decode_pdwm,
  19. .encode = infrared_common_encode_pdwm,
  20. .interpret = infrared_decoder_kaseikyo_interpret,
  21. .decode_repeat = NULL,
  22. .encode_repeat = NULL,
  23. };
  24. static const InfraredProtocolVariant infrared_protocol_variant_kaseikyo = {
  25. .name = "Kaseikyo",
  26. .address_length = 26,
  27. .command_length = 10,
  28. .frequency = INFRARED_COMMON_CARRIER_FREQUENCY,
  29. .duty_cycle = INFRARED_COMMON_DUTY_CYCLE,
  30. .repeat_count = INFRARED_KASEIKYO_REPEAT_COUNT_MIN,
  31. };
  32. const InfraredProtocolVariant* infrared_protocol_kaseikyo_get_variant(InfraredProtocol protocol) {
  33. if(protocol == InfraredProtocolKaseikyo)
  34. return &infrared_protocol_variant_kaseikyo;
  35. else
  36. return NULL;
  37. }