infrared_protocol_nec_i.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #include "../common/infrared_common_i.h"
  3. #define INFRARED_NEC_PREAMBLE_MARK 9000
  4. #define INFRARED_NEC_PREAMBLE_SPACE 4500
  5. #define INFRARED_NEC_BIT1_MARK 560
  6. #define INFRARED_NEC_BIT1_SPACE 1690
  7. #define INFRARED_NEC_BIT0_MARK 560
  8. #define INFRARED_NEC_BIT0_SPACE 560
  9. #define INFRARED_NEC_REPEAT_PERIOD 110000
  10. #define INFRARED_NEC_SILENCE INFRARED_NEC_REPEAT_PERIOD
  11. #define INFRARED_NEC_MIN_SPLIT_TIME INFRARED_NEC_REPEAT_PAUSE_MIN
  12. #define INFRARED_NEC_REPEAT_PAUSE_MIN 4000
  13. #define INFRARED_NEC_REPEAT_PAUSE_MAX 150000
  14. #define INFRARED_NEC_REPEAT_COUNT_MIN 1
  15. #define INFRARED_NEC_REPEAT_MARK 9000
  16. #define INFRARED_NEC_REPEAT_SPACE 2250
  17. #define INFRARED_NEC_PREAMBLE_TOLERANCE 200 // us
  18. #define INFRARED_NEC_BIT_TOLERANCE 120 // us
  19. extern const InfraredCommonProtocolSpec infrared_protocol_nec;
  20. bool infrared_decoder_nec_interpret(InfraredCommonDecoder* decoder);
  21. InfraredStatus infrared_decoder_nec_decode_repeat(InfraredCommonDecoder* decoder);
  22. InfraredStatus infrared_encoder_nec_encode_repeat(
  23. InfraredCommonEncoder* encoder,
  24. uint32_t* duration,
  25. bool* level);