Flipper Zero Firmware
Loading...
Searching...
No Matches
infrared_protocol_samsung_i.h
1#pragma once
2
3#include "../common/infrared_common_i.h"
4
5#define INFRARED_SAMSUNG_PREAMBLE_MARK 4500
6#define INFRARED_SAMSUNG_PREAMBLE_SPACE 4500
7#define INFRARED_SAMSUNG_BIT1_MARK 550
8#define INFRARED_SAMSUNG_BIT1_SPACE 1650
9#define INFRARED_SAMSUNG_BIT0_MARK 550
10#define INFRARED_SAMSUNG_BIT0_SPACE 550
11#define INFRARED_SAMSUNG_REPEAT_PAUSE_MIN 30000
12#define INFRARED_SAMSUNG_REPEAT_PAUSE_MAX 140000
13#define INFRARED_SAMSUNG_REPEAT_PAUSE1 46000
14#define INFRARED_SAMSUNG_REPEAT_PAUSE2 97000
15#define INFRARED_SAMSUNG_REPEAT_COUNT_MIN 1
16/* Samsung silence have to be greater than REPEAT MAX
17 * otherwise there can be problems during unit tests parsing
18 * of some data. Real tolerances we don't know, but in real life
19 * silence time should be greater than max repeat time. This is
20 * because of similar preambule timings for repeat and first messages. */
21#define INFRARED_SAMSUNG_MIN_SPLIT_TIME 5000
22#define INFRARED_SAMSUNG_SILENCE 145000
23#define INFRARED_SAMSUNG_REPEAT_MARK 4500
24#define INFRARED_SAMSUNG_REPEAT_SPACE 4500
25#define INFRARED_SAMSUNG_PREAMBLE_TOLERANCE 200 // us
26#define INFRARED_SAMSUNG_BIT_TOLERANCE 120 // us
27
28bool infrared_decoder_samsung32_interpret(InfraredCommonDecoder* decoder);
29InfraredStatus infrared_decoder_samsung32_decode_repeat(InfraredCommonDecoder* decoder);
30InfraredStatus infrared_encoder_samsung32_encode_repeat(
31 InfraredCommonEncoder* encoder,
32 uint32_t* duration,
33 bool* level);
34
35extern const InfraredCommonProtocolSpec infrared_protocol_samsung32;
Definition infrared_common_i.h:42
Definition infrared_common_i.h:55
Definition infrared_common_i.h:18