infrared_protocol_rc6_i.h 984 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "../common/infrared_common_i.h"
  3. #define INFRARED_RC6_CARRIER_FREQUENCY 36000
  4. #define INFRARED_RC6_DUTY_CYCLE 0.33
  5. #define INFRARED_RC6_PREAMBLE_MARK 2666
  6. #define INFRARED_RC6_PREAMBLE_SPACE 889
  7. #define INFRARED_RC6_BIT 444 // half of time-quant for 1 bit
  8. #define INFRARED_RC6_PREAMBLE_TOLERANCE 200 // us
  9. #define INFRARED_RC6_BIT_TOLERANCE 120 // us
  10. /* protocol allows 2700 silence, but it is hard to send 1 message without repeat */
  11. #define INFRARED_RC6_SILENCE (2700 * 10)
  12. #define INFRARED_RC6_MIN_SPLIT_TIME 2700
  13. #define INFRARED_RC6_REPEAT_COUNT_MIN 1
  14. extern const InfraredCommonProtocolSpec infrared_protocol_rc6;
  15. bool infrared_decoder_rc6_interpret(InfraredCommonDecoder* decoder);
  16. InfraredStatus infrared_decoder_rc6_decode_manchester(
  17. InfraredCommonDecoder* decoder,
  18. bool level,
  19. uint32_t timing);
  20. InfraredStatus infrared_encoder_rc6_encode_manchester(
  21. InfraredCommonEncoder* encoder_ptr,
  22. uint32_t* duration,
  23. bool* polarity);