[FL-1696, FL-1685] IRDA: Add RC5, decoder refactoring (#663)
* [FL-1696] IRDA: Split decoders and protocols * IRDA: Restruct directories. * IRDA: fix long timings * [FL-1685] IRDA: Add RC5 Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -37,6 +37,7 @@ bool irda_decoder_rc6_interpret(IrdaCommonDecoder* decoder) {
|
||||
*prev_toggle = toggle;
|
||||
message->command = command;
|
||||
message->address = address;
|
||||
message->protocol = IrdaProtocolRC6;
|
||||
result = true;
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#include "furi/memmgr.h"
|
||||
#include "irda.h"
|
||||
#include "irda_common_i.h"
|
||||
#include "common/irda_common_i.h"
|
||||
#include "irda_protocol_defs_i.h"
|
||||
#include <stdint.h>
|
||||
#include "../irda_i.h"
|
||||
|
18
lib/irda/encoder_decoder/rc6/irda_rc6_spec.c
Normal file
18
lib/irda/encoder_decoder/rc6/irda_rc6_spec.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "../irda_i.h"
|
||||
#include "irda_protocol_defs_i.h"
|
||||
|
||||
static const IrdaProtocolSpecification irda_rc6_protocol_specification = {
|
||||
.name = "RC6",
|
||||
.address_length = 2,
|
||||
.command_length = 2,
|
||||
.frequency = IRDA_RC6_CARRIER_FREQUENCY,
|
||||
.duty_cycle = IRDA_RC6_DUTY_CYCLE,
|
||||
};
|
||||
|
||||
const IrdaProtocolSpecification* irda_rc6_get_spec(IrdaProtocol protocol) {
|
||||
if (protocol == IrdaProtocolRC6)
|
||||
return &irda_rc6_protocol_specification;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user