infrared_protocol_kaseikyo_i.h 1.4 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "../common/infrared_common_i.h"
  3. #define INFRARED_KASEIKYO_UNIT 432
  4. #define INFRARED_KASEIKYO_PREAMBLE_MARK (8 * INFRARED_KASEIKYO_UNIT)
  5. #define INFRARED_KASEIKYO_PREAMBLE_SPACE (4 * INFRARED_KASEIKYO_UNIT)
  6. #define INFRARED_KASEIKYO_BIT1_MARK INFRARED_KASEIKYO_UNIT
  7. #define INFRARED_KASEIKYO_BIT1_SPACE (3 * INFRARED_KASEIKYO_UNIT)
  8. #define INFRARED_KASEIKYO_BIT0_MARK INFRARED_KASEIKYO_UNIT
  9. #define INFRARED_KASEIKYO_BIT0_SPACE INFRARED_KASEIKYO_UNIT
  10. #define INFRARED_KASEIKYO_REPEAT_PERIOD 130000
  11. #define INFRARED_KASEIKYO_SILENCE INFRARED_KASEIKYO_REPEAT_PERIOD
  12. #define INFRARED_KASEIKYO_MIN_SPLIT_TIME INFRARED_KASEIKYO_REPEAT_PAUSE_MIN
  13. #define INFRARED_KASEIKYO_REPEAT_PAUSE_MIN 4000
  14. #define INFRARED_KASEIKYO_REPEAT_PAUSE_MAX 150000
  15. #define INFRARED_KASEIKYO_REPEAT_COUNT_MIN 1
  16. #define INFRARED_KASEIKYO_REPEAT_MARK INFRARED_KASEIKYO_PREAMBLE_MARK
  17. #define INFRARED_KASEIKYO_REPEAT_SPACE (INFRARED_KASEIKYO_REPEAT_PERIOD - 56000)
  18. #define INFRARED_KASEIKYO_PREAMBLE_TOLERANCE 200 // us
  19. #define INFRARED_KASEIKYO_BIT_TOLERANCE 120 // us
  20. extern const InfraredCommonProtocolSpec infrared_protocol_kaseikyo;
  21. bool infrared_decoder_kaseikyo_interpret(InfraredCommonDecoder* decoder);
  22. InfraredStatus infrared_decoder_kaseikyo_decode_repeat(InfraredCommonDecoder* decoder);
  23. InfraredStatus infrared_encoder_kaseikyo_encode_repeat(
  24. InfraredCommonEncoder* encoder,
  25. uint32_t* duration,
  26. bool* level);