mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2026-10-23 21:32:23 +00:00
* clang-format: AllowShortEnumsOnASingleLine: false * clang-format: InsertNewlineAtEOF: true * clang-format: Standard: c++20 * clang-format: AlignConsecutiveBitFields * clang-format: AlignConsecutiveMacros * clang-format: RemoveParentheses: ReturnStatement * clang-format: RemoveSemicolon: true * Restored RemoveParentheses: Leave, retained general changes for it * formatting: fixed logging TAGs * Formatting update for dev Co-authored-by: あく <alleteam@gmail.com>
30 lines
1.1 KiB
C
30 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include "../common/infrared_common_i.h"
|
|
|
|
#define INFRARED_NEC_PREAMBLE_MARK 9000
|
|
#define INFRARED_NEC_PREAMBLE_SPACE 4500
|
|
#define INFRARED_NEC_BIT1_MARK 560
|
|
#define INFRARED_NEC_BIT1_SPACE 1690
|
|
#define INFRARED_NEC_BIT0_MARK 560
|
|
#define INFRARED_NEC_BIT0_SPACE 560
|
|
#define INFRARED_NEC_REPEAT_PERIOD 110000
|
|
#define INFRARED_NEC_SILENCE INFRARED_NEC_REPEAT_PERIOD
|
|
#define INFRARED_NEC_MIN_SPLIT_TIME INFRARED_NEC_REPEAT_PAUSE_MIN
|
|
#define INFRARED_NEC_REPEAT_PAUSE_MIN 4000
|
|
#define INFRARED_NEC_REPEAT_PAUSE_MAX 150000
|
|
#define INFRARED_NEC_REPEAT_COUNT_MIN 1
|
|
#define INFRARED_NEC_REPEAT_MARK 9000
|
|
#define INFRARED_NEC_REPEAT_SPACE 2250
|
|
#define INFRARED_NEC_PREAMBLE_TOLERANCE 200 // us
|
|
#define INFRARED_NEC_BIT_TOLERANCE 120 // us
|
|
|
|
extern const InfraredCommonProtocolSpec infrared_protocol_nec;
|
|
|
|
bool infrared_decoder_nec_interpret(InfraredCommonDecoder* decoder);
|
|
InfraredStatus infrared_decoder_nec_decode_repeat(InfraredCommonDecoder* decoder);
|
|
InfraredStatus infrared_encoder_nec_encode_repeat(
|
|
InfraredCommonEncoder* encoder,
|
|
uint32_t* duration,
|
|
bool* level);
|