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