|
|
@@ -0,0 +1,112 @@
|
|
|
+/*
|
|
|
+_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+_____---------______--____--__--__------____--____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+_____---------______--____--__--__--____------____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+_____---------______--____--__--__------____--____--__----____--__----__--__--____----____--__--__--__--__--___________
|
|
|
+ | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
|
|
|
+ s m2 m1 m0 T | address | command |
|
|
|
+*/
|
|
|
+
|
|
|
+const uint32_t test_decoder_rc6_input1[] = {
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444 + 888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 444 + 444, 888 + 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 888, // failed
|
|
|
+};
|
|
|
+
|
|
|
+const IrdaMessage test_decoder_rc6_expected1[] = {
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 1
|
|
|
+// {IrdaProtocolRC6, 0x93, 0xA0, false},
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, true}, // toggle 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, true}, // toggle 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 1
|
|
|
+// {IrdaProtocolRC6, 0x93, 0xA0, false},
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // toggle 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA1, false}, // toggle 1
|
|
|
+// {IrdaProtocolRC6, 0x93, 0xA0, false},
|
|
|
+};
|
|
|
+
|
|
|
+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 uint32_t test_encoder_rc6_expected1[] = {
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 888,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444, 888, 888+444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+2700, 2666, 889, 444, 888, 444, 444, 444, 444, 444+888, 888, 444, 888, 444, 444, 888, 888, 444, 444, 888, 444, 444, 444, 444, 888, 888, 888, 444, 444, 444, 444, 444, 444, 444, 444, 444,
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+const IrdaMessage test_rc6_all[] = {
|
|
|
+ {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
|
|
|
+// 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
|
|
|
+
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA0, false}, // t 0
|
|
|
+ {IrdaProtocolRC6, 0x93, 0xA1, false}, // t 1
|
|
|
+};
|
|
|
+
|