infrared_protocol_sirc_i.h 919 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "../common/infrared_common_i.h"
  3. #define INFRARED_SIRC_CARRIER_FREQUENCY 40000
  4. #define INFRARED_SIRC_DUTY_CYCLE 0.33
  5. #define INFRARED_SIRC_PREAMBLE_MARK 2400
  6. #define INFRARED_SIRC_PREAMBLE_SPACE 600
  7. #define INFRARED_SIRC_BIT1_MARK 1200
  8. #define INFRARED_SIRC_BIT1_SPACE 600
  9. #define INFRARED_SIRC_BIT0_MARK 600
  10. #define INFRARED_SIRC_BIT0_SPACE 600
  11. #define INFRARED_SIRC_PREAMBLE_TOLERANCE 200 // us
  12. #define INFRARED_SIRC_BIT_TOLERANCE 120 // us
  13. #define INFRARED_SIRC_SILENCE 10000
  14. #define INFRARED_SIRC_MIN_SPLIT_TIME (INFRARED_SIRC_SILENCE - 1000)
  15. #define INFRARED_SIRC_REPEAT_PERIOD 45000
  16. #define INFRARED_SIRC_REPEAT_COUNT_MIN 3
  17. extern const InfraredCommonProtocolSpec infrared_protocol_sirc;
  18. bool infrared_decoder_sirc_interpret(InfraredCommonDecoder* decoder);
  19. InfraredStatus infrared_encoder_sirc_encode_repeat(
  20. InfraredCommonEncoder* encoder,
  21. uint32_t* duration,
  22. bool* level);