[FL-2279] IR doxygen, rename irda -> infrared (#1010)

* IR: Doxygen docs, some rename
* Rename irda -> infrared
* Rollback collateral renames

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Albert Kharisov
2022-02-25 19:22:58 +04:00
committed by GitHub
parent c42cce3c6c
commit 052237f8c9
159 changed files with 6387 additions and 5622 deletions

View File

@@ -1,13 +1,13 @@
#include <furi.h>
#include "../minunit.h"
#include "irda.h"
#include "common/irda_common_i.h"
#include "test_data/irda_nec_test_data.srcdata"
#include "test_data/irda_necext_test_data.srcdata"
#include "test_data/irda_samsung_test_data.srcdata"
#include "test_data/irda_rc6_test_data.srcdata"
#include "test_data/irda_rc5_test_data.srcdata"
#include "test_data/irda_sirc_test_data.srcdata"
#include "infrared.h"
#include "common/infrared_common_i.h"
#include "test_data/infrared_nec_test_data.srcdata"
#include "test_data/infrared_necext_test_data.srcdata"
#include "test_data/infrared_samsung_test_data.srcdata"
#include "test_data/infrared_rc6_test_data.srcdata"
#include "test_data/infrared_rc5_test_data.srcdata"
#include "test_data/infrared_sirc_test_data.srcdata"
#define RUN_ENCODER(data, expected) \
run_encoder((data), COUNT_OF(data), (expected), COUNT_OF(expected))
@@ -17,28 +17,28 @@
#define RUN_ENCODER_DECODER(data) run_encoder_decoder((data), COUNT_OF(data))
static IrdaDecoderHandler* decoder_handler;
static IrdaEncoderHandler* encoder_handler;
static InfraredDecoderHandler* decoder_handler;
static InfraredEncoderHandler* encoder_handler;
static void test_setup(void) {
decoder_handler = irda_alloc_decoder();
encoder_handler = irda_alloc_encoder();
decoder_handler = infrared_alloc_decoder();
encoder_handler = infrared_alloc_encoder();
}
static void test_teardown(void) {
irda_free_decoder(decoder_handler);
irda_free_encoder(encoder_handler);
infrared_free_decoder(decoder_handler);
infrared_free_encoder(encoder_handler);
}
static void compare_message_results(
const IrdaMessage* message_decoded,
const IrdaMessage* message_expected) {
const InfraredMessage* message_decoded,
const InfraredMessage* message_expected) {
mu_check(message_decoded->protocol == message_expected->protocol);
mu_check(message_decoded->command == message_expected->command);
mu_check(message_decoded->address == message_expected->address);
if((message_expected->protocol == IrdaProtocolSIRC) ||
(message_expected->protocol == IrdaProtocolSIRC15) ||
(message_expected->protocol == IrdaProtocolSIRC20)) {
if((message_expected->protocol == InfraredProtocolSIRC) ||
(message_expected->protocol == InfraredProtocolSIRC15) ||
(message_expected->protocol == InfraredProtocolSIRC20)) {
mu_check(message_decoded->repeat == false);
} else {
mu_check(message_decoded->repeat == message_expected->repeat);
@@ -47,19 +47,19 @@ static void compare_message_results(
/* Encodes signal and merges same levels (high+high, low+low) */
static void run_encoder_fill_array(
IrdaEncoderHandler* handler,
InfraredEncoderHandler* handler,
uint32_t* timings,
uint32_t* timings_len,
bool* start_level) {
uint32_t duration = 0;
bool level = false;
bool level_read;
IrdaStatus status = IrdaStatusError;
InfraredStatus status = InfraredStatusError;
int i = 0;
bool first = true;
while(1) {
status = irda_encode(handler, &duration, &level_read);
status = infrared_encode(handler, &duration, &level_read);
if(first) {
if(start_level) *start_level = level_read;
first = false;
@@ -72,8 +72,8 @@ static void run_encoder_fill_array(
level = level_read;
timings[i] += duration;
furi_check((status == IrdaStatusOk) || (status == IrdaStatusDone));
if(status == IrdaStatusDone) break;
furi_check((status == InfraredStatusOk) || (status == InfraredStatusDone));
if(status == InfraredStatusDone) break;
}
*timings_len = i + 1;
@@ -81,7 +81,7 @@ static void run_encoder_fill_array(
// messages in input array for encoder should have one protocol
static void run_encoder(
const IrdaMessage input_messages[],
const InfraredMessage input_messages[],
uint32_t input_messages_len,
const uint32_t expected_timings[],
uint32_t expected_timings_len) {
@@ -91,9 +91,9 @@ static void run_encoder(
timings = malloc(sizeof(uint32_t) * timings_len);
for(uint32_t message_counter = 0; message_counter < input_messages_len; ++message_counter) {
const IrdaMessage* message = &input_messages[message_counter];
const InfraredMessage* message = &input_messages[message_counter];
if(!message->repeat) {
irda_reset_encoder(encoder_handler, message);
infrared_reset_encoder(encoder_handler, message);
}
timings_len = 200;
@@ -109,25 +109,26 @@ static void run_encoder(
mu_assert(j == expected_timings_len, "encoded less timings than expected");
}
static void run_encoder_decoder(const IrdaMessage input_messages[], uint32_t input_messages_len) {
static void
run_encoder_decoder(const InfraredMessage input_messages[], uint32_t input_messages_len) {
uint32_t* timings = 0;
uint32_t timings_len = 200;
bool level = false;
timings = malloc(sizeof(uint32_t) * timings_len);
for(uint32_t message_counter = 0; message_counter < input_messages_len; ++message_counter) {
const IrdaMessage* message_encoded = &input_messages[message_counter];
const InfraredMessage* message_encoded = &input_messages[message_counter];
if(!message_encoded->repeat) {
irda_reset_encoder(encoder_handler, message_encoded);
infrared_reset_encoder(encoder_handler, message_encoded);
}
timings_len = 200;
run_encoder_fill_array(encoder_handler, timings, &timings_len, &level);
furi_check(timings_len <= 200);
const IrdaMessage* message_decoded = 0;
const InfraredMessage* message_decoded = 0;
for(int i = 0; i < timings_len; ++i) {
message_decoded = irda_decode(decoder_handler, level, timings[i]);
message_decoded = infrared_decode(decoder_handler, level, timings[i]);
if((i == timings_len - 2) && level && message_decoded) {
/* In case we end with space timing - message can be decoded at last mark */
break;
@@ -135,7 +136,7 @@ static void run_encoder_decoder(const IrdaMessage input_messages[], uint32_t inp
mu_check(!message_decoded);
} else {
if(!message_decoded) {
message_decoded = irda_check_decoder_ready(decoder_handler);
message_decoded = infrared_check_decoder_ready(decoder_handler);
}
mu_check(message_decoded);
}
@@ -153,32 +154,32 @@ static void run_encoder_decoder(const IrdaMessage input_messages[], uint32_t inp
static void run_decoder(
const uint32_t* input_delays,
uint32_t input_delays_len,
const IrdaMessage* message_expected,
const InfraredMessage* message_expected,
uint32_t message_expected_len) {
IrdaMessage message_decoded_check_local;
InfraredMessage message_decoded_check_local;
bool level = 0;
uint32_t message_counter = 0;
const IrdaMessage* message_decoded = 0;
const InfraredMessage* message_decoded = 0;
for(uint32_t i = 0; i < input_delays_len; ++i) {
const IrdaMessage* message_decoded_check = 0;
const InfraredMessage* message_decoded_check = 0;
if(input_delays[i] > IRDA_RAW_RX_TIMING_DELAY_US) {
message_decoded_check = irda_check_decoder_ready(decoder_handler);
if(input_delays[i] > INFRARED_RAW_RX_TIMING_DELAY_US) {
message_decoded_check = infrared_check_decoder_ready(decoder_handler);
if(message_decoded_check) {
/* irda_decode() can reset message, but we have to call irda_decode() to perform real
* simulation: irda_check() by timeout, then irda_decode() when meet edge */
/* infrared_decode() can reset message, but we have to call infrared_decode() to perform real
* simulation: infrared_check() by timeout, then infrared_decode() when meet edge */
message_decoded_check_local = *message_decoded_check;
message_decoded_check = &message_decoded_check_local;
}
}
message_decoded = irda_decode(decoder_handler, level, input_delays[i]);
message_decoded = infrared_decode(decoder_handler, level, input_delays[i]);
if(message_decoded_check || message_decoded) {
mu_assert(
!(message_decoded_check && message_decoded),
"both messages decoded: check_ready() and irda_decode()");
"both messages decoded: check_ready() and infrared_decode()");
if(message_decoded_check) {
message_decoded = message_decoded_check;
@@ -192,7 +193,7 @@ static void run_decoder(
level = !level;
}
message_decoded = irda_check_decoder_ready(decoder_handler);
message_decoded = infrared_check_decoder_ready(decoder_handler);
if(message_decoded) {
compare_message_results(message_decoded, &message_expected[message_counter]);
++message_counter;
@@ -304,7 +305,7 @@ MU_TEST(test_encoder_decoder_all) {
RUN_ENCODER_DECODER(test_sirc);
}
MU_TEST_SUITE(test_irda_decoder_encoder) {
MU_TEST_SUITE(test_infrared_decoder_encoder) {
MU_SUITE_CONFIGURE(&test_setup, &test_teardown);
MU_RUN_TEST(test_encoder_sirc);
@@ -323,8 +324,8 @@ MU_TEST_SUITE(test_irda_decoder_encoder) {
MU_RUN_TEST(test_encoder_decoder_all);
}
int run_minunit_test_irda_decoder_encoder() {
MU_RUN_SUITE(test_irda_decoder_encoder);
int run_minunit_test_infrared_decoder_encoder() {
MU_RUN_SUITE(test_infrared_decoder_encoder);
return MU_EXIT_CODE;
}

View File

@@ -10,10 +10,10 @@ const uint32_t test_decoder_nec_input1[] = {
/* message */
1415838, 9080, 4436, 611, 494, 600, 505, 578, 500, 608, 501, 602, 502, 580, 498, 606, 508, 605, 500, 583, 1633, 608, 1608, 611, 1631, 578, 1638, 602, 1614, 606, 1637, 583, 1633, 607, 1609, 611, 494, 600, 505, 570, 500, 604, 501, 602, 502, 581, 497, 606, 499, 605, 499, 583, 1633, 617, 1608, 611, 1631, 579, 1638, 602};
const IrdaMessage test_decoder_nec_expected1[] = {
{IrdaProtocolNEC, 0x00, 0, false},
{IrdaProtocolNEC, 0x00, 0, true},
{IrdaProtocolNEC, 0x00, 0, false},
const InfraredMessage test_decoder_nec_expected1[] = {
{InfraredProtocolNEC, 0x00, 0, false},
{InfraredProtocolNEC, 0x00, 0, true},
{InfraredProtocolNEC, 0x00, 0, false},
};
const uint32_t test_decoder_nec_input2[] = {
@@ -123,59 +123,59 @@ const uint32_t test_decoder_nec_input2[] = {
40069,9025,2221,588
};
const IrdaMessage test_decoder_nec_expected2[] = {
{IrdaProtocolNEC, 0x00, 0x02, false},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, false},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x02, true},
{IrdaProtocolNEC, 0x00, 0x06, false},
{IrdaProtocolNEC, 0x00, 0x06, true},
{IrdaProtocolNEC, 0x00, 0x04, false},
{IrdaProtocolNEC, 0x00, 0x04, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x09, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x08, true},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x08, false},
{IrdaProtocolNEC, 0x00, 0x0A, false},
{IrdaProtocolNEC, 0x00, 0x0A, true},
const InfraredMessage test_decoder_nec_expected2[] = {
{InfraredProtocolNEC, 0x00, 0x02, false},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, false},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x02, true},
{InfraredProtocolNEC, 0x00, 0x06, false},
{InfraredProtocolNEC, 0x00, 0x06, true},
{InfraredProtocolNEC, 0x00, 0x04, false},
{InfraredProtocolNEC, 0x00, 0x04, true},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, true},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, true},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x09, false},
{InfraredProtocolNEC, 0x00, 0x09, false},
{InfraredProtocolNEC, 0x00, 0x09, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x0A, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, true},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x08, true},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x0A, false},
{InfraredProtocolNEC, 0x00, 0x08, false},
{InfraredProtocolNEC, 0x00, 0x0A, false},
{InfraredProtocolNEC, 0x00, 0x0A, true},
};
const uint32_t test_decoder_nec_input3[] = {
@@ -198,112 +198,112 @@ const uint32_t test_decoder_nec_input3[] = {
92592, 8861, 4414, 538,
};
const IrdaMessage test_decoder_nec_expected3[] = {
{IrdaProtocolNECext, 0x286, 0xB649, false},
{IrdaProtocolNECext, 0x286, 0xB649, false},
{IrdaProtocolNECext, 0x6880, 0xB649, false},
{IrdaProtocolNECext, 0x6880, 0xB649, false},
{IrdaProtocolNECext, 0x6380, 0x150F, false},
{IrdaProtocolNECext, 0x6380, 0x150F, false},
{IrdaProtocolNECext, 0x6480, 0x849, false},
{IrdaProtocolNECext, 0x6480, 0x849, false},
{IrdaProtocolNECext, 0x7A83, 0x8, false},
{IrdaProtocolNECext, 0x7A83, 0x8, false},
{IrdaProtocolNEC, 0x71, 0x4A, false},
{IrdaProtocolNEC, 0x71, 0x4A, false},
{IrdaProtocolNEC42, 0x7B, 0x0, false},
{IrdaProtocolNEC42, 0x7B, 0x0, false},
{IrdaProtocolNEC42, 0x11C, 0x12, false},
const InfraredMessage test_decoder_nec_expected3[] = {
{InfraredProtocolNECext, 0x286, 0xB649, false},
{InfraredProtocolNECext, 0x286, 0xB649, false},
{InfraredProtocolNECext, 0x6880, 0xB649, false},
{InfraredProtocolNECext, 0x6880, 0xB649, false},
{InfraredProtocolNECext, 0x6380, 0x150F, false},
{InfraredProtocolNECext, 0x6380, 0x150F, false},
{InfraredProtocolNECext, 0x6480, 0x849, false},
{InfraredProtocolNECext, 0x6480, 0x849, false},
{InfraredProtocolNECext, 0x7A83, 0x8, false},
{InfraredProtocolNECext, 0x7A83, 0x8, false},
{InfraredProtocolNEC, 0x71, 0x4A, false},
{InfraredProtocolNEC, 0x71, 0x4A, false},
{InfraredProtocolNEC42, 0x7B, 0x0, false},
{InfraredProtocolNEC42, 0x7B, 0x0, false},
{InfraredProtocolNEC42, 0x11C, 0x12, false},
};
const IrdaMessage test_nec[] = {
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x01, 0x00, false},
{IrdaProtocolNEC, 0x01, 0x80, false},
{IrdaProtocolNEC, 0x00, 0x80, false},
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x00, 0x00, true},
{IrdaProtocolNEC, 0x00, 0x00, false},
{IrdaProtocolNEC, 0x00, 0x00, true},
{IrdaProtocolNEC, 0xFF, 0xFF, false},
{IrdaProtocolNEC, 0xFE, 0xFF, false},
{IrdaProtocolNEC, 0xFE, 0x7F, false},
{IrdaProtocolNEC, 0xFF, 0x7F, false},
{IrdaProtocolNEC, 0xFF, 0xFF, false},
{IrdaProtocolNEC, 0xFF, 0xFF, true},
{IrdaProtocolNEC, 0xAA, 0x55, false},
{IrdaProtocolNEC, 0x55, 0xAA, false},
{IrdaProtocolNEC, 0x55, 0x55, false},
{IrdaProtocolNEC, 0xAA, 0xAA, false},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
const InfraredMessage test_nec[] = {
{InfraredProtocolNEC, 0x00, 0x00, false},
{InfraredProtocolNEC, 0x01, 0x00, false},
{InfraredProtocolNEC, 0x01, 0x80, false},
{InfraredProtocolNEC, 0x00, 0x80, false},
{InfraredProtocolNEC, 0x00, 0x00, false},
{InfraredProtocolNEC, 0x00, 0x00, true},
{InfraredProtocolNEC, 0x00, 0x00, false},
{InfraredProtocolNEC, 0x00, 0x00, true},
{InfraredProtocolNEC, 0xFF, 0xFF, false},
{InfraredProtocolNEC, 0xFE, 0xFF, false},
{InfraredProtocolNEC, 0xFE, 0x7F, false},
{InfraredProtocolNEC, 0xFF, 0x7F, false},
{InfraredProtocolNEC, 0xFF, 0xFF, false},
{InfraredProtocolNEC, 0xFF, 0xFF, true},
{InfraredProtocolNEC, 0xAA, 0x55, false},
{InfraredProtocolNEC, 0x55, 0xAA, false},
{InfraredProtocolNEC, 0x55, 0x55, false},
{InfraredProtocolNEC, 0xAA, 0xAA, false},
{InfraredProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0xAA, 0xAA, false},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0xAA, 0xAA, true},
{InfraredProtocolNEC, 0xAA, 0xAA, false},
{InfraredProtocolNEC, 0xAA, 0xAA, true},
{InfraredProtocolNEC, 0xAA, 0xAA, true},
{IrdaProtocolNEC, 0x55, 0x55, false},
{IrdaProtocolNEC, 0x55, 0x55, true},
{IrdaProtocolNEC, 0x55, 0x55, true},
{IrdaProtocolNEC, 0x55, 0x55, true},
{InfraredProtocolNEC, 0x55, 0x55, false},
{InfraredProtocolNEC, 0x55, 0x55, true},
{InfraredProtocolNEC, 0x55, 0x55, true},
{InfraredProtocolNEC, 0x55, 0x55, true},
};
const IrdaMessage test_nec42[] = {
{IrdaProtocolNEC42, 0x0000, 0x00, false},
{IrdaProtocolNEC42, 0x0001, 0x00, false},
{IrdaProtocolNEC42, 0x0001, 0x80, false},
{IrdaProtocolNEC42, 0x0000, 0x80, false},
{IrdaProtocolNEC42, 0x0000, 0x00, false},
{IrdaProtocolNEC42, 0x0000, 0x00, true},
{IrdaProtocolNEC42, 0x0000, 0x00, false},
{IrdaProtocolNEC42, 0x0000, 0x00, true},
{IrdaProtocolNEC42, 0x1FFF, 0xFF, false},
{IrdaProtocolNEC42, 0x1FFE, 0xFF, false},
{IrdaProtocolNEC42, 0x1FFE, 0x7F, false},
{IrdaProtocolNEC42, 0x1FFF, 0x7F, false},
{IrdaProtocolNEC42, 0x1FFF, 0xFF, false},
{IrdaProtocolNEC42, 0x1FFF, 0xFF, true},
{IrdaProtocolNEC42, 0x0AAA, 0x55, false},
{IrdaProtocolNEC42, 0x1555, 0xAA, false},
{IrdaProtocolNEC42, 0x1555, 0x55, false},
{IrdaProtocolNEC42, 0x0AAA, 0xAA, false},
{IrdaProtocolNEC42, 0x0AAA, 0xAA, true},
{IrdaProtocolNEC42, 0x0AAA, 0xAA, false},
{IrdaProtocolNEC42, 0x0AAA, 0xAA, true},
{IrdaProtocolNEC42, 0x0AAA, 0xAA, true},
{IrdaProtocolNEC42, 0x1555, 0x55, false},
{IrdaProtocolNEC42, 0x1555, 0x55, true},
{IrdaProtocolNEC42, 0x1555, 0x55, true},
{IrdaProtocolNEC42, 0x1555, 0x55, true},
const InfraredMessage test_nec42[] = {
{InfraredProtocolNEC42, 0x0000, 0x00, false},
{InfraredProtocolNEC42, 0x0001, 0x00, false},
{InfraredProtocolNEC42, 0x0001, 0x80, false},
{InfraredProtocolNEC42, 0x0000, 0x80, false},
{InfraredProtocolNEC42, 0x0000, 0x00, false},
{InfraredProtocolNEC42, 0x0000, 0x00, true},
{InfraredProtocolNEC42, 0x0000, 0x00, false},
{InfraredProtocolNEC42, 0x0000, 0x00, true},
{InfraredProtocolNEC42, 0x1FFF, 0xFF, false},
{InfraredProtocolNEC42, 0x1FFE, 0xFF, false},
{InfraredProtocolNEC42, 0x1FFE, 0x7F, false},
{InfraredProtocolNEC42, 0x1FFF, 0x7F, false},
{InfraredProtocolNEC42, 0x1FFF, 0xFF, false},
{InfraredProtocolNEC42, 0x1FFF, 0xFF, true},
{InfraredProtocolNEC42, 0x0AAA, 0x55, false},
{InfraredProtocolNEC42, 0x1555, 0xAA, false},
{InfraredProtocolNEC42, 0x1555, 0x55, false},
{InfraredProtocolNEC42, 0x0AAA, 0xAA, false},
{InfraredProtocolNEC42, 0x0AAA, 0xAA, true},
{InfraredProtocolNEC42, 0x0AAA, 0xAA, false},
{InfraredProtocolNEC42, 0x0AAA, 0xAA, true},
{InfraredProtocolNEC42, 0x0AAA, 0xAA, true},
{InfraredProtocolNEC42, 0x1555, 0x55, false},
{InfraredProtocolNEC42, 0x1555, 0x55, true},
{InfraredProtocolNEC42, 0x1555, 0x55, true},
{InfraredProtocolNEC42, 0x1555, 0x55, true},
};
const IrdaMessage test_nec42ext[] = {
{IrdaProtocolNEC42ext, 0x0000000, 0x0000, false},
{IrdaProtocolNEC42ext, 0x0000001, 0x0000, false},
{IrdaProtocolNEC42ext, 0x0000001, 0x8000, false},
{IrdaProtocolNEC42ext, 0x0000000, 0x8000, false},
{IrdaProtocolNEC42ext, 0x0000000, 0x0000, false},
{IrdaProtocolNEC42ext, 0x0000000, 0x0000, true},
{IrdaProtocolNEC42ext, 0x0000000, 0x0000, false},
{IrdaProtocolNEC42ext, 0x0000000, 0x0000, true},
{IrdaProtocolNEC42ext, 0x3F000FF, 0xF00F, false},
{IrdaProtocolNEC42ext, 0x3F000FE, 0xF00F, false},
{IrdaProtocolNEC42ext, 0x3F000FE, 0x700F, false},
{IrdaProtocolNEC42ext, 0x3F000FF, 0x700F, false},
{IrdaProtocolNEC42ext, 0x3F000FF, 0xF00F, false},
{IrdaProtocolNEC42ext, 0x3F000FF, 0xF00F, true},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0x5555, false},
{IrdaProtocolNEC42ext, 0x1555555, 0xAAAA, false},
{IrdaProtocolNEC42ext, 0x1555555, 0x5555, false},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, false},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, false},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{IrdaProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{IrdaProtocolNEC42ext, 0x1555555, 0x5555, false},
{IrdaProtocolNEC42ext, 0x1555555, 0x5555, true},
{IrdaProtocolNEC42ext, 0x1555555, 0x5555, true},
{IrdaProtocolNEC42ext, 0x1555555, 0x5555, true},
const InfraredMessage test_nec42ext[] = {
{InfraredProtocolNEC42ext, 0x0000000, 0x0000, false},
{InfraredProtocolNEC42ext, 0x0000001, 0x0000, false},
{InfraredProtocolNEC42ext, 0x0000001, 0x8000, false},
{InfraredProtocolNEC42ext, 0x0000000, 0x8000, false},
{InfraredProtocolNEC42ext, 0x0000000, 0x0000, false},
{InfraredProtocolNEC42ext, 0x0000000, 0x0000, true},
{InfraredProtocolNEC42ext, 0x0000000, 0x0000, false},
{InfraredProtocolNEC42ext, 0x0000000, 0x0000, true},
{InfraredProtocolNEC42ext, 0x3F000FF, 0xF00F, false},
{InfraredProtocolNEC42ext, 0x3F000FE, 0xF00F, false},
{InfraredProtocolNEC42ext, 0x3F000FE, 0x700F, false},
{InfraredProtocolNEC42ext, 0x3F000FF, 0x700F, false},
{InfraredProtocolNEC42ext, 0x3F000FF, 0xF00F, false},
{InfraredProtocolNEC42ext, 0x3F000FF, 0xF00F, true},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0x5555, false},
{InfraredProtocolNEC42ext, 0x1555555, 0xAAAA, false},
{InfraredProtocolNEC42ext, 0x1555555, 0x5555, false},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, false},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, false},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{InfraredProtocolNEC42ext, 0x2AAAAAA, 0xAAAA, true},
{InfraredProtocolNEC42ext, 0x1555555, 0x5555, false},
{InfraredProtocolNEC42ext, 0x1555555, 0x5555, true},
{InfraredProtocolNEC42ext, 0x1555555, 0x5555, true},
{InfraredProtocolNEC42ext, 0x1555555, 0x5555, true},
};
const uint32_t test_decoder_nec42ext_input1[] = {
@@ -331,11 +331,11 @@ const uint32_t test_decoder_nec42ext_input2[] = {
560, 560, 560, 560, 560, 10000, 560, // 42 OK + 1 failed
};
const IrdaMessage test_decoder_nec42ext_expected1[] = {
{IrdaProtocolNEC42ext, 0x00, 0, false},
const InfraredMessage test_decoder_nec42ext_expected1[] = {
{InfraredProtocolNEC42ext, 0x00, 0, false},
};
const IrdaMessage test_decoder_nec42ext_expected2[] = {
{IrdaProtocolNEC42ext, 0x00, 0, false},
const InfraredMessage test_decoder_nec42ext_expected2[] = {
{InfraredProtocolNEC42ext, 0x00, 0, false},
};

View File

@@ -110,146 +110,146 @@ const uint32_t test_decoder_necext_input1[] = {
261924, 8965, 4465, 585, 529, 588, 525, 592, 1638, 588, 525, 592, 523, 584, 530, 587, 526, 591, 1639, 587, 1642, 583, 529, 587, 527, 590, 1639, 587, 1643, 584, 1646, 590,
};
const IrdaMessage test_decoder_necext_expected1[] = {
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, false},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
{IrdaProtocolNECext, 0x7984, 0xed12, true},
const InfraredMessage test_decoder_necext_expected1[] = {
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, false},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
{InfraredProtocolNECext, 0x7984, 0xed12, true},
};
const IrdaMessage test_necext[] = {
{IrdaProtocolNECext, 0x0000, 0x0000, false},
{IrdaProtocolNECext, 0x0001, 0x0000, false},
{IrdaProtocolNECext, 0x0001, 0x8000, false},
{IrdaProtocolNECext, 0x0000, 0x8000, false},
{IrdaProtocolNECext, 0x0000, 0x0000, false},
{IrdaProtocolNECext, 0x0000, 0x0000, true},
{IrdaProtocolNECext, 0x0000, 0x0000, false},
{IrdaProtocolNECext, 0x0000, 0x0000, true},
{IrdaProtocolNECext, 0xFFFF, 0xFFFF, false},
{IrdaProtocolNECext, 0xFFFE, 0xFFFF, false},
{IrdaProtocolNECext, 0xFFFE, 0x7FFF, false},
{IrdaProtocolNECext, 0xFFFF, 0x7FFF, false},
{IrdaProtocolNECext, 0xFFFF, 0xFFFF, false},
{IrdaProtocolNECext, 0xFFFF, 0xFFFF, true},
{IrdaProtocolNECext, 0xAAAA, 0x5555, false},
{IrdaProtocolNECext, 0x5555, 0xAAAA, false},
{IrdaProtocolNECext, 0x5555, 0x5555, false},
{IrdaProtocolNECext, 0xAAAA, 0xAAAA, false},
{IrdaProtocolNECext, 0xAAAA, 0xAAAA, true},
const InfraredMessage test_necext[] = {
{InfraredProtocolNECext, 0x0000, 0x0000, false},
{InfraredProtocolNECext, 0x0001, 0x0000, false},
{InfraredProtocolNECext, 0x0001, 0x8000, false},
{InfraredProtocolNECext, 0x0000, 0x8000, false},
{InfraredProtocolNECext, 0x0000, 0x0000, false},
{InfraredProtocolNECext, 0x0000, 0x0000, true},
{InfraredProtocolNECext, 0x0000, 0x0000, false},
{InfraredProtocolNECext, 0x0000, 0x0000, true},
{InfraredProtocolNECext, 0xFFFF, 0xFFFF, false},
{InfraredProtocolNECext, 0xFFFE, 0xFFFF, false},
{InfraredProtocolNECext, 0xFFFE, 0x7FFF, false},
{InfraredProtocolNECext, 0xFFFF, 0x7FFF, false},
{InfraredProtocolNECext, 0xFFFF, 0xFFFF, false},
{InfraredProtocolNECext, 0xFFFF, 0xFFFF, true},
{InfraredProtocolNECext, 0xAAAA, 0x5555, false},
{InfraredProtocolNECext, 0x5555, 0xAAAA, false},
{InfraredProtocolNECext, 0x5555, 0x5555, false},
{InfraredProtocolNECext, 0xAAAA, 0xAAAA, false},
{InfraredProtocolNECext, 0xAAAA, 0xAAAA, true},
{IrdaProtocolNECext, 0xAAAA, 0xAAAA, false},
{IrdaProtocolNECext, 0xAAAA, 0xAAAA, true},
{IrdaProtocolNECext, 0xAAAA, 0xAAAA, true},
{InfraredProtocolNECext, 0xAAAA, 0xAAAA, false},
{InfraredProtocolNECext, 0xAAAA, 0xAAAA, true},
{InfraredProtocolNECext, 0xAAAA, 0xAAAA, true},
{IrdaProtocolNECext, 0x5555, 0x5555, false},
{IrdaProtocolNECext, 0x5555, 0x5555, true},
{IrdaProtocolNECext, 0x5555, 0x5555, true},
{IrdaProtocolNECext, 0x5555, 0x5555, true},
{InfraredProtocolNECext, 0x5555, 0x5555, false},
{InfraredProtocolNECext, 0x5555, 0x5555, true},
{InfraredProtocolNECext, 0x5555, 0x5555, true},
{InfraredProtocolNECext, 0x5555, 0x5555, true},
};

View File

@@ -8,8 +8,8 @@ const uint32_t test_decoder_rc5x_input1[] = {
27000 + 888, 1776, 888, 888, 1776, 1776, 888, 888, 1776, 888, 888, 1776, 1776, 1776, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5x_expected1[] = {
{IrdaProtocolRC5X, 0x13, 0x10, false}, // toggle 0
const InfraredMessage test_decoder_rc5x_expected1[] = {
{InfraredProtocolRC5X, 0x13, 0x10, false}, // toggle 0
};
/*
@@ -22,8 +22,8 @@ const uint32_t test_decoder_rc5_input1[] = {
27000 + 888, 888, 888, 1776, 1776, 1776, 888, 888, 1776, 888, 888, 1776, 1776, 1776, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5_expected1[] = {
{IrdaProtocolRC5, 0x13, 0x10, false}, // toggle 0
const InfraredMessage test_decoder_rc5_expected1[] = {
{InfraredProtocolRC5, 0x13, 0x10, false}, // toggle 0
};
@@ -37,8 +37,8 @@ const uint32_t test_decoder_rc5_input2[] = {
27000 + 888, 888, 888, 888, 888, 888, 888, 1776, 888, 888, 1776, 888, 888, 1776, 1776, 1776, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5_expected2[] = {
{IrdaProtocolRC5, 0x13, 0x10, false}, // toggle 1
const InfraredMessage test_decoder_rc5_expected2[] = {
{InfraredProtocolRC5, 0x13, 0x10, false}, // toggle 1
};
/*
@@ -51,8 +51,8 @@ const uint32_t test_decoder_rc5_input3[] = {
27000 + 888, 888, 888, 1776, 1776, 1776, 888, 888, 1776, 888, 888, 1776, 1776, 1776, 888, 888, 888, 888, 1776, 888,
};
const IrdaMessage test_decoder_rc5_expected3[] = {
{IrdaProtocolRC5, 0x13, 0x11, false}, // toggle 0
const InfraredMessage test_decoder_rc5_expected3[] = {
{InfraredProtocolRC5, 0x13, 0x11, false}, // toggle 0
};
@@ -66,8 +66,8 @@ const uint32_t test_decoder_rc5_input4[] = {
27000 + 888, 888, 888, 888, 888, 888, 888, 1776, 888, 888, 1776, 888, 888, 1776, 1776, 1776, 888, 888, 888, 888, 1776, 888,
};
const IrdaMessage test_decoder_rc5_expected4[] = {
{IrdaProtocolRC5, 0x13, 0x11, false}, // toggle 1
const InfraredMessage test_decoder_rc5_expected4[] = {
{InfraredProtocolRC5, 0x13, 0x11, false}, // toggle 1
};
/*
@@ -80,8 +80,8 @@ const uint32_t test_decoder_rc5_input5[] = {
27000 + 888, 888, 888, 1776, 1776, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5_expected5[] = {
{IrdaProtocolRC5, 0x1F, 0x3F, false}, // toggle 0
const InfraredMessage test_decoder_rc5_expected5[] = {
{InfraredProtocolRC5, 0x1F, 0x3F, false}, // toggle 0
};
/*
@@ -94,8 +94,8 @@ const uint32_t test_decoder_rc5_input6[] = {
27000 + 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5_expected6[] = {
{IrdaProtocolRC5, 0x1F, 0x3F, false}, // toggle 1
const InfraredMessage test_decoder_rc5_expected6[] = {
{InfraredProtocolRC5, 0x1F, 0x3F, false}, // toggle 1
};
@@ -113,48 +113,48 @@ const uint32_t test_decoder_rc5_input_all_repeats[] = {
27000 + 888, 888, 888, 1776, 1776, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888, 888,
};
const IrdaMessage test_decoder_rc5_expected_all_repeats[] = {
{IrdaProtocolRC5, 0x13, 0x11, false}, // toggle 0
{IrdaProtocolRC5, 0x13, 0x11, false}, // toggle 1
{IrdaProtocolRC5, 0x13, 0x11, true}, // toggle 1
{IrdaProtocolRC5, 0x13, 0x11, true}, // toggle 1
{IrdaProtocolRC5, 0x13, 0x11, false}, // toggle 0
{IrdaProtocolRC5, 0x13, 0x10, false}, // toggle 1
{IrdaProtocolRC5, 0x13, 0x10, false}, // toggle 0
{IrdaProtocolRC5, 0x13, 0x10, true}, // toggle 0
{IrdaProtocolRC5, 0x1F, 0x3F, false}, // toggle 1
{IrdaProtocolRC5, 0x1F, 0x3F, false}, // toggle 0
{IrdaProtocolRC5, 0x1F, 0x3F, true}, // toggle 0
const InfraredMessage test_decoder_rc5_expected_all_repeats[] = {
{InfraredProtocolRC5, 0x13, 0x11, false}, // toggle 0
{InfraredProtocolRC5, 0x13, 0x11, false}, // toggle 1
{InfraredProtocolRC5, 0x13, 0x11, true}, // toggle 1
{InfraredProtocolRC5, 0x13, 0x11, true}, // toggle 1
{InfraredProtocolRC5, 0x13, 0x11, false}, // toggle 0
{InfraredProtocolRC5, 0x13, 0x10, false}, // toggle 1
{InfraredProtocolRC5, 0x13, 0x10, false}, // toggle 0
{InfraredProtocolRC5, 0x13, 0x10, true}, // toggle 0
{InfraredProtocolRC5, 0x1F, 0x3F, false}, // toggle 1
{InfraredProtocolRC5, 0x1F, 0x3F, false}, // toggle 0
{InfraredProtocolRC5, 0x1F, 0x3F, true}, // toggle 0
};
const IrdaMessage test_rc5[] = {
{IrdaProtocolRC5, 0x1F, 0x3F, false},
{IrdaProtocolRC5, 0x00, 0x00, false},
{IrdaProtocolRC5, 0x10, 0x01, false},
{IrdaProtocolRC5, 0x01, 0x20, false},
{IrdaProtocolRC5, 0x01, 0x20, false},
{IrdaProtocolRC5, 0x01, 0x20, true},
{IrdaProtocolRC5, 0x01, 0x20, true},
{IrdaProtocolRC5, 0x01, 0x20, true},
{IrdaProtocolRC5, 0x01, 0x20, true},
{IrdaProtocolRC5, 0x1F, 0x3F, false},
{IrdaProtocolRC5, 0x0A, 0x2A, false},
{IrdaProtocolRC5, 0x15, 0x15, false},
{IrdaProtocolRC5, 0x15, 0x15, true},
const InfraredMessage test_rc5[] = {
{InfraredProtocolRC5, 0x1F, 0x3F, false},
{InfraredProtocolRC5, 0x00, 0x00, false},
{InfraredProtocolRC5, 0x10, 0x01, false},
{InfraredProtocolRC5, 0x01, 0x20, false},
{InfraredProtocolRC5, 0x01, 0x20, false},
{InfraredProtocolRC5, 0x01, 0x20, true},
{InfraredProtocolRC5, 0x01, 0x20, true},
{InfraredProtocolRC5, 0x01, 0x20, true},
{InfraredProtocolRC5, 0x01, 0x20, true},
{InfraredProtocolRC5, 0x1F, 0x3F, false},
{InfraredProtocolRC5, 0x0A, 0x2A, false},
{InfraredProtocolRC5, 0x15, 0x15, false},
{InfraredProtocolRC5, 0x15, 0x15, true},
{IrdaProtocolRC5X, 0x1F, 0x3F, false},
{IrdaProtocolRC5X, 0x00, 0x00, false},
{IrdaProtocolRC5X, 0x10, 0x01, false},
{IrdaProtocolRC5X, 0x01, 0x20, false},
{IrdaProtocolRC5X, 0x01, 0x20, false},
{IrdaProtocolRC5X, 0x01, 0x20, true},
{IrdaProtocolRC5X, 0x01, 0x20, true},
{IrdaProtocolRC5X, 0x01, 0x20, true},
{IrdaProtocolRC5X, 0x01, 0x20, true},
{IrdaProtocolRC5X, 0x1F, 0x3F, false},
{IrdaProtocolRC5X, 0x0A, 0x2A, false},
{IrdaProtocolRC5X, 0x15, 0x15, false},
{IrdaProtocolRC5X, 0x15, 0x15, true},
{InfraredProtocolRC5X, 0x1F, 0x3F, false},
{InfraredProtocolRC5X, 0x00, 0x00, false},
{InfraredProtocolRC5X, 0x10, 0x01, false},
{InfraredProtocolRC5X, 0x01, 0x20, false},
{InfraredProtocolRC5X, 0x01, 0x20, false},
{InfraredProtocolRC5X, 0x01, 0x20, true},
{InfraredProtocolRC5X, 0x01, 0x20, true},
{InfraredProtocolRC5X, 0x01, 0x20, true},
{InfraredProtocolRC5X, 0x01, 0x20, true},
{InfraredProtocolRC5X, 0x1F, 0x3F, false},
{InfraredProtocolRC5X, 0x0A, 0x2A, false},
{InfraredProtocolRC5X, 0x15, 0x15, false},
{InfraredProtocolRC5X, 0x15, 0x15, true},
};

View File

@@ -79,28 +79,28 @@ const uint32_t test_decoder_rc6_input1[] = {
27000, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 888, 888, 888, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
};
const IrdaMessage test_decoder_rc6_expected1[] = {
{IrdaProtocolRC6, 0x94, 0xA0, false}, // toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 1
// {IrdaProtocolRC6, 0x95, 0xA0, false}, failed
{IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
{IrdaProtocolRC6, 0x94, 0xA0, false}, // toggle 1
{IrdaProtocolRC6, 0x95, 0xA0, false}, // toggle 0
// {IrdaProtocolRC6, 0x93, 0xA0, false}, failed
// {IrdaProtocolRC6, 0x93, 0xA0, false}, failed
// {IrdaProtocolRC6, 0x93, 0xA0, false}, failed
{IrdaProtocolRC6, 0x95, 0xA0, false}, // toggle 1
const InfraredMessage test_decoder_rc6_expected1[] = {
{InfraredProtocolRC6, 0x94, 0xA0, false}, // toggle 0
{InfraredProtocolRC6, 0x93, 0xA0, false}, // toggle 1
// {InfraredProtocolRC6, 0x95, 0xA0, false}, failed
{InfraredProtocolRC6, 0x93, 0xA0, false}, // toggle 0
{InfraredProtocolRC6, 0x94, 0xA0, false}, // toggle 1
{InfraredProtocolRC6, 0x95, 0xA0, false}, // toggle 0
// {InfraredProtocolRC6, 0x93, 0xA0, false}, failed
// {InfraredProtocolRC6, 0x93, 0xA0, false}, failed
// {InfraredProtocolRC6, 0x93, 0xA0, false}, failed
{InfraredProtocolRC6, 0x95, 0xA0, false}, // toggle 1
};
const IrdaMessage test_encoder_rc6_input1[] = {
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, true}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA1, false}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{IrdaProtocolRC6, 0x93, 0xA0, false}, // Toggle 1
{IrdaProtocolRC6, 0x93, 0xA0, true}, // Toggle 1
const InfraredMessage test_encoder_rc6_input1[] = {
{InfraredProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{InfraredProtocolRC6, 0x93, 0xA0, true}, // Toggle 0
{InfraredProtocolRC6, 0x93, 0xA1, false}, // Toggle 1
{InfraredProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{InfraredProtocolRC6, 0x93, 0xA1, true}, // Toggle 1
{InfraredProtocolRC6, 0x93, 0xA0, false}, // Toggle 0
{InfraredProtocolRC6, 0x93, 0xA0, false}, // Toggle 1
{InfraredProtocolRC6, 0x93, 0xA0, true}, // Toggle 1
};
const uint32_t test_encoder_rc6_expected1[] = {
@@ -115,48 +115,48 @@ const uint32_t test_encoder_rc6_expected1[] = {
};
const IrdaMessage test_rc6[] = {
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x80, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x80, 0x01, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x01, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0x7F, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0x7F, 0xFE, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFE, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, true}, // t 0
{IrdaProtocolRC6, 0xAA, 0x55, false}, // t 1
{IrdaProtocolRC6, 0x55, 0xAA, false}, // t 0
{IrdaProtocolRC6, 0x55, 0x55, false}, // t 1
{IrdaProtocolRC6, 0xAA, 0xAA, false}, // t 0
{IrdaProtocolRC6, 0xAA, 0xAA, true}, // t 0
const InfraredMessage test_rc6[] = {
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 0
{InfraredProtocolRC6, 0x80, 0x00, false}, // t 1
{InfraredProtocolRC6, 0x80, 0x01, false}, // t 0
{InfraredProtocolRC6, 0x00, 0x01, false}, // t 1
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 0
{InfraredProtocolRC6, 0x00, 0x00, true}, // t 0
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 1
{InfraredProtocolRC6, 0x00, 0x00, true}, // t 1
{InfraredProtocolRC6, 0xFF, 0xFF, false}, // t 0
{InfraredProtocolRC6, 0x7F, 0xFF, false}, // t 1
{InfraredProtocolRC6, 0x7F, 0xFE, false}, // t 0
{InfraredProtocolRC6, 0xFF, 0xFE, false}, // t 1
{InfraredProtocolRC6, 0xFF, 0xFF, false}, // t 0
{InfraredProtocolRC6, 0xFF, 0xFF, true}, // t 0
{InfraredProtocolRC6, 0xAA, 0x55, false}, // t 1
{InfraredProtocolRC6, 0x55, 0xAA, false}, // t 0
{InfraredProtocolRC6, 0x55, 0x55, false}, // t 1
{InfraredProtocolRC6, 0xAA, 0xAA, false}, // t 0
{InfraredProtocolRC6, 0xAA, 0xAA, true}, // t 0
// same with inverted toggle bit
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x80, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x80, 0x01, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x01, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 1
{IrdaProtocolRC6, 0x00, 0x00, false}, // t 0
{IrdaProtocolRC6, 0x00, 0x00, true}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0x7F, 0xFF, false}, // t 0
{IrdaProtocolRC6, 0x7F, 0xFE, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFE, false}, // t 0
{IrdaProtocolRC6, 0xFF, 0xFF, false}, // t 1
{IrdaProtocolRC6, 0xFF, 0xFF, true}, // t 1
{IrdaProtocolRC6, 0xAA, 0x55, false}, // t 0
{IrdaProtocolRC6, 0x55, 0xAA, false}, // t 1
{IrdaProtocolRC6, 0x55, 0x55, false}, // t 0
{IrdaProtocolRC6, 0xAA, 0xAA, false}, // t 1
{IrdaProtocolRC6, 0xAA, 0xAA, true}, // t 1
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 1
{InfraredProtocolRC6, 0x80, 0x00, false}, // t 0
{InfraredProtocolRC6, 0x80, 0x01, false}, // t 1
{InfraredProtocolRC6, 0x00, 0x01, false}, // t 0
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 1
{InfraredProtocolRC6, 0x00, 0x00, true}, // t 1
{InfraredProtocolRC6, 0x00, 0x00, false}, // t 0
{InfraredProtocolRC6, 0x00, 0x00, true}, // t 0
{InfraredProtocolRC6, 0xFF, 0xFF, false}, // t 1
{InfraredProtocolRC6, 0x7F, 0xFF, false}, // t 0
{InfraredProtocolRC6, 0x7F, 0xFE, false}, // t 1
{InfraredProtocolRC6, 0xFF, 0xFE, false}, // t 0
{InfraredProtocolRC6, 0xFF, 0xFF, false}, // t 1
{InfraredProtocolRC6, 0xFF, 0xFF, true}, // t 1
{InfraredProtocolRC6, 0xAA, 0x55, false}, // t 0
{InfraredProtocolRC6, 0x55, 0xAA, false}, // t 1
{InfraredProtocolRC6, 0x55, 0x55, false}, // t 0
{InfraredProtocolRC6, 0xAA, 0xAA, false}, // t 1
{InfraredProtocolRC6, 0xAA, 0xAA, true}, // t 1
{IrdaProtocolRC6, 0x93, 0xA0, false}, // t 0
{IrdaProtocolRC6, 0x93, 0xA1, false}, // t 1
{InfraredProtocolRC6, 0x93, 0xA0, false}, // t 0
{InfraredProtocolRC6, 0x93, 0xA1, false}, // t 1
};

View File

@@ -179,76 +179,76 @@ const uint32_t test_decoder_samsung32_input1[] = {
532, 584,
};
const IrdaMessage test_decoder_samsung32_expected1[] = {
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x81, false}, {IrdaProtocolSamsung32, 0x0E, 0x81, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x02, false}, {IrdaProtocolSamsung32, 0x0E, 0x02, true},
{IrdaProtocolSamsung32, 0x0E, 0x03, false}, {IrdaProtocolSamsung32, 0x0E, 0x03, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, true},
{IrdaProtocolSamsung32, 0x0E, 0x0C, false}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x0C, true}, {IrdaProtocolSamsung32, 0x0E, 0x0C, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, true}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, true}, {IrdaProtocolSamsung32, 0x0E, 0x01, false},
{IrdaProtocolSamsung32, 0x0E, 0x01, false}, {IrdaProtocolSamsung32, 0x0E, 0x01, true},
const InfraredMessage test_decoder_samsung32_expected1[] = {
{InfraredProtocolSamsung32, 0x0E, 0x0C, false}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x81, false}, {InfraredProtocolSamsung32, 0x0E, 0x81, true},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, true},
{InfraredProtocolSamsung32, 0x0E, 0x02, false}, {InfraredProtocolSamsung32, 0x0E, 0x02, true},
{InfraredProtocolSamsung32, 0x0E, 0x03, false}, {InfraredProtocolSamsung32, 0x0E, 0x03, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, false}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, false},
{InfraredProtocolSamsung32, 0x0E, 0x0C, false}, {InfraredProtocolSamsung32, 0x0E, 0x0C, false},
{InfraredProtocolSamsung32, 0x0E, 0x0C, false}, {InfraredProtocolSamsung32, 0x0E, 0x0C, true},
{InfraredProtocolSamsung32, 0x0E, 0x0C, false}, {InfraredProtocolSamsung32, 0x0E, 0x0C, false},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, false},
{InfraredProtocolSamsung32, 0x0E, 0x0C, true}, {InfraredProtocolSamsung32, 0x0E, 0x0C, false},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, true},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, true},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, false},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, true},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, false},
{InfraredProtocolSamsung32, 0x0E, 0x01, true}, {InfraredProtocolSamsung32, 0x0E, 0x01, false},
{InfraredProtocolSamsung32, 0x0E, 0x01, true}, {InfraredProtocolSamsung32, 0x0E, 0x01, false},
{InfraredProtocolSamsung32, 0x0E, 0x01, false}, {InfraredProtocolSamsung32, 0x0E, 0x01, true},
};
const IrdaMessage test_samsung32[] = {
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x01, 0x00, false},
{IrdaProtocolSamsung32, 0x01, 0x80, false},
{IrdaProtocolSamsung32, 0x00, 0x80, false},
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x00, 0x00, true},
{IrdaProtocolSamsung32, 0x00, 0x00, false},
{IrdaProtocolSamsung32, 0x00, 0x00, true},
{IrdaProtocolSamsung32, 0xFF, 0xFF, false},
{IrdaProtocolSamsung32, 0xFE, 0xFF, false},
{IrdaProtocolSamsung32, 0xFE, 0x7F, false},
{IrdaProtocolSamsung32, 0xFF, 0x7F, false},
{IrdaProtocolSamsung32, 0xFF, 0xFF, false},
{IrdaProtocolSamsung32, 0xFF, 0xFF, true},
{IrdaProtocolSamsung32, 0xAA, 0x55, false},
{IrdaProtocolSamsung32, 0x55, 0xAA, false},
{IrdaProtocolSamsung32, 0x55, 0x55, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
const InfraredMessage test_samsung32[] = {
{InfraredProtocolSamsung32, 0x00, 0x00, false},
{InfraredProtocolSamsung32, 0x01, 0x00, false},
{InfraredProtocolSamsung32, 0x01, 0x80, false},
{InfraredProtocolSamsung32, 0x00, 0x80, false},
{InfraredProtocolSamsung32, 0x00, 0x00, false},
{InfraredProtocolSamsung32, 0x00, 0x00, true},
{InfraredProtocolSamsung32, 0x00, 0x00, false},
{InfraredProtocolSamsung32, 0x00, 0x00, true},
{InfraredProtocolSamsung32, 0xFF, 0xFF, false},
{InfraredProtocolSamsung32, 0xFE, 0xFF, false},
{InfraredProtocolSamsung32, 0xFE, 0x7F, false},
{InfraredProtocolSamsung32, 0xFF, 0x7F, false},
{InfraredProtocolSamsung32, 0xFF, 0xFF, false},
{InfraredProtocolSamsung32, 0xFF, 0xFF, true},
{InfraredProtocolSamsung32, 0xAA, 0x55, false},
{InfraredProtocolSamsung32, 0x55, 0xAA, false},
{InfraredProtocolSamsung32, 0x55, 0x55, false},
{InfraredProtocolSamsung32, 0xAA, 0xAA, false},
{InfraredProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0xAA, 0xAA, false},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0xAA, 0xAA, true},
{InfraredProtocolSamsung32, 0xAA, 0xAA, false},
{InfraredProtocolSamsung32, 0xAA, 0xAA, true},
{InfraredProtocolSamsung32, 0xAA, 0xAA, true},
{IrdaProtocolSamsung32, 0x55, 0x55, false},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
{IrdaProtocolSamsung32, 0x55, 0x55, true},
{InfraredProtocolSamsung32, 0x55, 0x55, false},
{InfraredProtocolSamsung32, 0x55, 0x55, true},
{InfraredProtocolSamsung32, 0x55, 0x55, true},
{InfraredProtocolSamsung32, 0x55, 0x55, true},
};

View File

@@ -124,128 +124,128 @@ const uint32_t test_decoder_sirc_input1[] = { /* 121 timings */
26263, 2414, 611, 1192, 607, 544, 606, 1197, 602, 569, 606, 1197, 602, 539, 611, 540, 635, 1168, 606, 565, 610, 541, 608, 563, 587, 564,
};
const IrdaMessage test_decoder_sirc_expected1[] = {
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x60, false},
{IrdaProtocolSIRC, 0x10, 0x60, false},
{IrdaProtocolSIRC, 0x10, 0x60, false},
{IrdaProtocolSIRC, 0x10, 0x65, false},
{IrdaProtocolSIRC, 0x10, 0x65, false},
{IrdaProtocolSIRC, 0x10, 0x65, false},
{IrdaProtocolSIRC20, 0x410, 0x17, false},
{IrdaProtocolSIRC20, 0x410, 0x17, false},
{IrdaProtocolSIRC20, 0x410, 0x17, false},
{IrdaProtocolSIRC, 0x10, 0x21, false},
{IrdaProtocolSIRC, 0x10, 0x21, false},
{IrdaProtocolSIRC, 0x10, 0x21, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7B, false},
{IrdaProtocolSIRC20, 0x73A, 0x7B, false},
{IrdaProtocolSIRC20, 0x73A, 0x7B, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x78, false},
{IrdaProtocolSIRC20, 0x73A, 0x78, false},
{IrdaProtocolSIRC20, 0x73A, 0x78, false},
{IrdaProtocolSIRC20, 0x73A, 0x79, false},
{IrdaProtocolSIRC20, 0x73A, 0x79, false},
{IrdaProtocolSIRC20, 0x73A, 0x79, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x7A, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7C, false},
{IrdaProtocolSIRC20, 0x73A, 0x7D, false},
{IrdaProtocolSIRC20, 0x73A, 0x7D, false},
{IrdaProtocolSIRC20, 0x73A, 0x7D, false},
{IrdaProtocolSIRC20, 0x73A, 0x73, false},
{IrdaProtocolSIRC20, 0x73A, 0x73, false},
{IrdaProtocolSIRC20, 0x73A, 0x73, false},
{IrdaProtocolSIRC, 0x10, 0x13, false},
{IrdaProtocolSIRC, 0x10, 0x13, false},
{IrdaProtocolSIRC, 0x10, 0x13, false},
{IrdaProtocolSIRC, 0x10, 0x13, false},
{IrdaProtocolSIRC, 0x10, 0x12, false},
{IrdaProtocolSIRC, 0x10, 0x12, false},
{IrdaProtocolSIRC, 0x10, 0x12, false},
{IrdaProtocolSIRC, 0x10, 0x12, false},
{IrdaProtocolSIRC20, 0x73A, 0x30, false},
{IrdaProtocolSIRC20, 0x73A, 0x30, false},
{IrdaProtocolSIRC20, 0x73A, 0x30, false},
{IrdaProtocolSIRC20, 0x73A, 0x39, false},
{IrdaProtocolSIRC20, 0x73A, 0x39, false},
{IrdaProtocolSIRC20, 0x73A, 0x39, false},
{IrdaProtocolSIRC20, 0x73A, 0x31, false},
{IrdaProtocolSIRC20, 0x73A, 0x31, false},
{IrdaProtocolSIRC20, 0x73A, 0x31, false},
{IrdaProtocolSIRC20, 0x73A, 0x34, false},
{IrdaProtocolSIRC20, 0x73A, 0x34, false},
{IrdaProtocolSIRC20, 0x73A, 0x34, false},
{IrdaProtocolSIRC20, 0x73A, 0x32, false},
{IrdaProtocolSIRC20, 0x73A, 0x32, false},
{IrdaProtocolSIRC20, 0x73A, 0x32, false},
{IrdaProtocolSIRC20, 0x73A, 0x33, false},
{IrdaProtocolSIRC20, 0x73A, 0x33, false},
{IrdaProtocolSIRC20, 0x73A, 0x33, false},
{IrdaProtocolSIRC20, 0x73A, 0x0F, false},
{IrdaProtocolSIRC20, 0x73A, 0x0F, false},
{IrdaProtocolSIRC20, 0x73A, 0x0F, false},
{IrdaProtocolSIRC20, 0x73A, 0x38, false},
{IrdaProtocolSIRC20, 0x73A, 0x38, false},
{IrdaProtocolSIRC20, 0x73A, 0x38, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x10, 0x15, false},
{IrdaProtocolSIRC, 0x01, 0x2F, false},
{IrdaProtocolSIRC, 0x01, 0x2F, false},
{IrdaProtocolSIRC, 0x01, 0x15, false},
{IrdaProtocolSIRC, 0x01, 0x15, false},
{IrdaProtocolSIRC, 0x01, 0x15, false},
{IrdaProtocolSIRC, 0x01, 0x15, false},
const InfraredMessage test_decoder_sirc_expected1[] = {
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x60, false},
{InfraredProtocolSIRC, 0x10, 0x60, false},
{InfraredProtocolSIRC, 0x10, 0x60, false},
{InfraredProtocolSIRC, 0x10, 0x65, false},
{InfraredProtocolSIRC, 0x10, 0x65, false},
{InfraredProtocolSIRC, 0x10, 0x65, false},
{InfraredProtocolSIRC20, 0x410, 0x17, false},
{InfraredProtocolSIRC20, 0x410, 0x17, false},
{InfraredProtocolSIRC20, 0x410, 0x17, false},
{InfraredProtocolSIRC, 0x10, 0x21, false},
{InfraredProtocolSIRC, 0x10, 0x21, false},
{InfraredProtocolSIRC, 0x10, 0x21, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7B, false},
{InfraredProtocolSIRC20, 0x73A, 0x7B, false},
{InfraredProtocolSIRC20, 0x73A, 0x7B, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x78, false},
{InfraredProtocolSIRC20, 0x73A, 0x78, false},
{InfraredProtocolSIRC20, 0x73A, 0x78, false},
{InfraredProtocolSIRC20, 0x73A, 0x79, false},
{InfraredProtocolSIRC20, 0x73A, 0x79, false},
{InfraredProtocolSIRC20, 0x73A, 0x79, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x7A, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7C, false},
{InfraredProtocolSIRC20, 0x73A, 0x7D, false},
{InfraredProtocolSIRC20, 0x73A, 0x7D, false},
{InfraredProtocolSIRC20, 0x73A, 0x7D, false},
{InfraredProtocolSIRC20, 0x73A, 0x73, false},
{InfraredProtocolSIRC20, 0x73A, 0x73, false},
{InfraredProtocolSIRC20, 0x73A, 0x73, false},
{InfraredProtocolSIRC, 0x10, 0x13, false},
{InfraredProtocolSIRC, 0x10, 0x13, false},
{InfraredProtocolSIRC, 0x10, 0x13, false},
{InfraredProtocolSIRC, 0x10, 0x13, false},
{InfraredProtocolSIRC, 0x10, 0x12, false},
{InfraredProtocolSIRC, 0x10, 0x12, false},
{InfraredProtocolSIRC, 0x10, 0x12, false},
{InfraredProtocolSIRC, 0x10, 0x12, false},
{InfraredProtocolSIRC20, 0x73A, 0x30, false},
{InfraredProtocolSIRC20, 0x73A, 0x30, false},
{InfraredProtocolSIRC20, 0x73A, 0x30, false},
{InfraredProtocolSIRC20, 0x73A, 0x39, false},
{InfraredProtocolSIRC20, 0x73A, 0x39, false},
{InfraredProtocolSIRC20, 0x73A, 0x39, false},
{InfraredProtocolSIRC20, 0x73A, 0x31, false},
{InfraredProtocolSIRC20, 0x73A, 0x31, false},
{InfraredProtocolSIRC20, 0x73A, 0x31, false},
{InfraredProtocolSIRC20, 0x73A, 0x34, false},
{InfraredProtocolSIRC20, 0x73A, 0x34, false},
{InfraredProtocolSIRC20, 0x73A, 0x34, false},
{InfraredProtocolSIRC20, 0x73A, 0x32, false},
{InfraredProtocolSIRC20, 0x73A, 0x32, false},
{InfraredProtocolSIRC20, 0x73A, 0x32, false},
{InfraredProtocolSIRC20, 0x73A, 0x33, false},
{InfraredProtocolSIRC20, 0x73A, 0x33, false},
{InfraredProtocolSIRC20, 0x73A, 0x33, false},
{InfraredProtocolSIRC20, 0x73A, 0x0F, false},
{InfraredProtocolSIRC20, 0x73A, 0x0F, false},
{InfraredProtocolSIRC20, 0x73A, 0x0F, false},
{InfraredProtocolSIRC20, 0x73A, 0x38, false},
{InfraredProtocolSIRC20, 0x73A, 0x38, false},
{InfraredProtocolSIRC20, 0x73A, 0x38, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x10, 0x15, false},
{InfraredProtocolSIRC, 0x01, 0x2F, false},
{InfraredProtocolSIRC, 0x01, 0x2F, false},
{InfraredProtocolSIRC, 0x01, 0x15, false},
{InfraredProtocolSIRC, 0x01, 0x15, false},
{InfraredProtocolSIRC, 0x01, 0x15, false},
{InfraredProtocolSIRC, 0x01, 0x15, false},
};
@@ -284,23 +284,23 @@ const uint32_t test_decoder_sirc_input2[] = {
1000000, 2400, 600, 1200, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600,
};
const IrdaMessage test_decoder_sirc_expected2[] = {
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
const InfraredMessage test_decoder_sirc_expected2[] = {
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
/* failed - 13 data bits */
{IrdaProtocolSIRC, 0x1F, 0x7F, false},
{InfraredProtocolSIRC, 0x1F, 0x7F, false},
/* failed - 2 data bits */
{IrdaProtocolSIRC, 0x1F, 0x7F, false},
{InfraredProtocolSIRC, 0x1F, 0x7F, false},
/* failed - sudden end */
{IrdaProtocolSIRC, 0x1F, 0x7F, false},
{InfraredProtocolSIRC, 0x1F, 0x7F, false},
/* failed */
{IrdaProtocolSIRC, 0x0A, 0x55, false},
{InfraredProtocolSIRC, 0x0A, 0x55, false},
{IrdaProtocolSIRC, 0x00, 0x00, false},
{InfraredProtocolSIRC, 0x00, 0x00, false},
{IrdaProtocolSIRC, 0x0D, 0x53, false},
{InfraredProtocolSIRC, 0x0D, 0x53, false},
};
@@ -334,18 +334,18 @@ const uint32_t test_decoder_sirc_input3[] = {
10000, 2400, 600, 1200, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 1200,
};
const IrdaMessage test_decoder_sirc_expected3[] = {
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x0D, 0x53, false},
{IrdaProtocolSIRC15, 0x0D, 0x53, false},
{IrdaProtocolSIRC15, 0x0D, 0x53, false},
{IrdaProtocolSIRC15, 0x0D, 0x53, false},
{IrdaProtocolSIRC15, 0x0D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0xFD, 0x13, false},
const InfraredMessage test_decoder_sirc_expected3[] = {
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x0D, 0x53, false},
{InfraredProtocolSIRC15, 0x0D, 0x53, false},
{InfraredProtocolSIRC15, 0x0D, 0x53, false},
{InfraredProtocolSIRC15, 0x0D, 0x53, false},
{InfraredProtocolSIRC15, 0x0D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0xFD, 0x13, false},
};
const uint32_t test_decoder_sirc_input4[] = {
@@ -357,13 +357,13 @@ const uint32_t test_decoder_sirc_input4[] = {
1000000, 2400, 600, 1200, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 600,
};
const IrdaMessage test_decoder_sirc_expected4[] = {
{IrdaProtocolSIRC20, 0xFB5, 0x53, false}, // {IrdaProtocolSIRC20, 0x15, 0x3ED3, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
const InfraredMessage test_decoder_sirc_expected4[] = {
{InfraredProtocolSIRC20, 0xFB5, 0x53, false}, // {InfraredProtocolSIRC20, 0x15, 0x3ED3, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
};
const uint32_t test_decoder_sirc_input5[] = {
@@ -396,48 +396,48 @@ const uint32_t test_decoder_sirc_input5[] = {
10000, 2400, 600, 1200, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 600,
};
const IrdaMessage test_decoder_sirc_expected5[] = {
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
const InfraredMessage test_decoder_sirc_expected5[] = {
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{IrdaProtocolSIRC, 0xA, 0x55, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
{InfraredProtocolSIRC, 0xA, 0x55, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC20, 0xFB5, 0x53, false},
};
const IrdaMessage test_encoder_sirc_input1[] = {
{IrdaProtocolSIRC, 0xA, 0x55, false},
const InfraredMessage test_encoder_sirc_input1[] = {
{InfraredProtocolSIRC, 0xA, 0x55, false},
};
const uint32_t test_encoder_sirc_expected1[] = {
10000, 2400, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 600,
};
const IrdaMessage test_encoder_sirc_input2[] = {
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, true},
{IrdaProtocolSIRC15, 0x7D, 0x53, true},
const InfraredMessage test_encoder_sirc_input2[] = {
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, true},
{InfraredProtocolSIRC15, 0x7D, 0x53, true},
};
const uint32_t test_encoder_sirc_expected2[] = {
@@ -446,34 +446,34 @@ const uint32_t test_encoder_sirc_expected2[] = {
18600, 2400, 600, 1200, 600, 1200, 600, 600, 600, 600, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 600, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 1200, 600, 600,
};
const IrdaMessage test_sirc[] = {
{IrdaProtocolSIRC20, 0x1FFF, 0x7F, false},
{IrdaProtocolSIRC20, 0x1FFF, 0x7F, true},
{IrdaProtocolSIRC20, 0x1FFF, 0x7F, true},
{IrdaProtocolSIRC, 0x00, 0x00, false},
{IrdaProtocolSIRC, 0x00, 0x00, true},
{IrdaProtocolSIRC, 0x00, 0x00, true},
const InfraredMessage test_sirc[] = {
{InfraredProtocolSIRC20, 0x1FFF, 0x7F, false},
{InfraredProtocolSIRC20, 0x1FFF, 0x7F, true},
{InfraredProtocolSIRC20, 0x1FFF, 0x7F, true},
{InfraredProtocolSIRC, 0x00, 0x00, false},
{InfraredProtocolSIRC, 0x00, 0x00, true},
{InfraredProtocolSIRC, 0x00, 0x00, true},
{IrdaProtocolSIRC, 0x1A, 0x22, false},
{IrdaProtocolSIRC, 0x1A, 0x22, true},
{IrdaProtocolSIRC, 0x1A, 0x22, true},
{IrdaProtocolSIRC, 0x17, 0x0A, false},
{InfraredProtocolSIRC, 0x1A, 0x22, false},
{InfraredProtocolSIRC, 0x1A, 0x22, true},
{InfraredProtocolSIRC, 0x1A, 0x22, true},
{InfraredProtocolSIRC, 0x17, 0x0A, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, false},
{IrdaProtocolSIRC15, 0x7D, 0x53, true},
{IrdaProtocolSIRC15, 0x7D, 0x53, true},
{IrdaProtocolSIRC15, 0x71, 0x0, false},
{IrdaProtocolSIRC15, 0x15, 0x01, false},
{IrdaProtocolSIRC15, 0x01, 0x15, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, false},
{InfraredProtocolSIRC15, 0x7D, 0x53, true},
{InfraredProtocolSIRC15, 0x7D, 0x53, true},
{InfraredProtocolSIRC15, 0x71, 0x0, false},
{InfraredProtocolSIRC15, 0x15, 0x01, false},
{InfraredProtocolSIRC15, 0x01, 0x15, false},
{IrdaProtocolSIRC20, 0xAA, 0x55, false},
{IrdaProtocolSIRC20, 0x331, 0x71, false},
{InfraredProtocolSIRC20, 0xAA, 0x55, false},
{InfraredProtocolSIRC20, 0x331, 0x71, false},
{IrdaProtocolSIRC, 0x00, 0x00, false},
{IrdaProtocolSIRC, 0x1F, 0x7F, false},
{IrdaProtocolSIRC15, 0x00, 0x00, false},
{IrdaProtocolSIRC15, 0xFF, 0x7F, false},
{IrdaProtocolSIRC20, 0x00, 0x00, false},
{IrdaProtocolSIRC20, 0x1FFF, 0x7F, false},
{InfraredProtocolSIRC, 0x00, 0x00, false},
{InfraredProtocolSIRC, 0x1F, 0x7F, false},
{InfraredProtocolSIRC15, 0x00, 0x00, false},
{InfraredProtocolSIRC15, 0xFF, 0x7F, false},
{InfraredProtocolSIRC20, 0x00, 0x00, false},
{InfraredProtocolSIRC20, 0x1FFF, 0x7F, false},
};

View File

@@ -651,7 +651,7 @@ MU_TEST(test_storage_list) {
test_rpc_storage_list_run("/int", ++command_id);
test_rpc_storage_list_run("/ext", ++command_id);
test_rpc_storage_list_run("/ext/irda", ++command_id);
test_rpc_storage_list_run("/ext/infrared", ++command_id);
test_rpc_storage_list_run("/ext/ibutton", ++command_id);
test_rpc_storage_list_run("/ext/lfrfid", ++command_id);
test_rpc_storage_list_run("error_path", ++command_id);

View File

@@ -11,7 +11,7 @@
#define TAG "UnitTests"
int run_minunit();
int run_minunit_test_irda_decoder_encoder();
int run_minunit_test_infrared_decoder_encoder();
int run_minunit_test_rpc();
int run_minunit_test_flipper_format();
int run_minunit_test_flipper_format_string();
@@ -53,7 +53,7 @@ void unit_tests_cli(Cli* cli, string_t args, void* context) {
uint32_t cycle_counter = DWT->CYCCNT;
test_result |= run_minunit();
test_result |= run_minunit_test_irda_decoder_encoder();
test_result |= run_minunit_test_infrared_decoder_encoder();
test_result |= run_minunit_test_rpc();
test_result |= run_minunit_test_stream();
test_result |= run_minunit_test_flipper_format();