infrared_protocol_samsung_i.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "../common/infrared_common_i.h"
  3. #define INFRARED_SAMSUNG_PREAMBLE_MARK 4500
  4. #define INFRARED_SAMSUNG_PREAMBLE_SPACE 4500
  5. #define INFRARED_SAMSUNG_BIT1_MARK 550
  6. #define INFRARED_SAMSUNG_BIT1_SPACE 1650
  7. #define INFRARED_SAMSUNG_BIT0_MARK 550
  8. #define INFRARED_SAMSUNG_BIT0_SPACE 550
  9. #define INFRARED_SAMSUNG_REPEAT_PAUSE_MIN 30000
  10. #define INFRARED_SAMSUNG_REPEAT_PAUSE_MAX 140000
  11. #define INFRARED_SAMSUNG_REPEAT_PAUSE1 46000
  12. #define INFRARED_SAMSUNG_REPEAT_PAUSE2 97000
  13. #define INFRARED_SAMSUNG_REPEAT_COUNT_MIN 1
  14. /* Samsung silence have to be greater than REPEAT MAX
  15. * otherwise there can be problems during unit tests parsing
  16. * of some data. Real tolerances we don't know, but in real life
  17. * silence time should be greater than max repeat time. This is
  18. * because of similar preambule timings for repeat and first messages. */
  19. #define INFRARED_SAMSUNG_MIN_SPLIT_TIME 5000
  20. #define INFRARED_SAMSUNG_SILENCE 145000
  21. #define INFRARED_SAMSUNG_REPEAT_MARK 4500
  22. #define INFRARED_SAMSUNG_REPEAT_SPACE 4500
  23. #define INFRARED_SAMSUNG_PREAMBLE_TOLERANCE 200 // us
  24. #define INFRARED_SAMSUNG_BIT_TOLERANCE 120 // us
  25. bool infrared_decoder_samsung32_interpret(InfraredCommonDecoder* decoder);
  26. InfraredStatus infrared_decoder_samsung32_decode_repeat(InfraredCommonDecoder* decoder);
  27. InfraredStatus infrared_encoder_samsung32_encode_repeat(
  28. InfraredCommonEncoder* encoder,
  29. uint32_t* duration,
  30. bool* level);
  31. extern const InfraredCommonProtocolSpec infrared_protocol_samsung32;