From: Johannes Römer Date: Wed, 18 Feb 2015 19:54:40 +0000 (+0100) Subject: am230x: Add some AM232x tests. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d9f2032c554012324bb32f71d9348e5a77a60659;p=sigrok-test.git am230x: Add some AM232x tests. --- diff --git a/decoder/test/am230x/am2320_1mhz.output b/decoder/test/am230x/am2320_1mhz.output new file mode 100644 index 0000000..9ae0899 --- /dev/null +++ b/decoder/test/am230x/am2320_1mhz.output @@ -0,0 +1,51 @@ +42567-43569 am230x: start: "Start" "S" +43569-43730 am230x: response: "Response" "R" +43730-43810 am230x: bit: "Bit: 0" "0" +43810-43890 am230x: bit: "Bit: 0" "0" +43890-43970 am230x: bit: "Bit: 0" "0" +43970-44050 am230x: bit: "Bit: 0" "0" +44050-44130 am230x: bit: "Bit: 0" "0" +44130-44209 am230x: bit: "Bit: 0" "0" +44209-44289 am230x: bit: "Bit: 0" "0" +44289-44368 am230x: bit: "Bit: 0" "0" +43730-44368 am230x: byte: "Byte: 0x00" "0x00" +44368-44509 am230x: bit: "Bit: 1" "1" +44509-44635 am230x: bit: "Bit: 1" "1" +44635-44715 am230x: bit: "Bit: 0" "0" +44715-44842 am230x: bit: "Bit: 1" "1" +44842-44969 am230x: bit: "Bit: 1" "1" +44969-45095 am230x: bit: "Bit: 1" "1" +45095-45175 am230x: bit: "Bit: 0" "0" +45175-45301 am230x: bit: "Bit: 1" "1" +44368-45301 am230x: byte: "Byte: 0xdd" "0xdd" +43730-45301 am230x: humidity: "Humidity: 22.1 %" "RH = 22.1 %" +45301-45395 am230x: bit: "Bit: 0" "0" +45395-45474 am230x: bit: "Bit: 0" "0" +45474-45554 am230x: bit: "Bit: 0" "0" +45554-45634 am230x: bit: "Bit: 0" "0" +45634-45714 am230x: bit: "Bit: 0" "0" +45714-45794 am230x: bit: "Bit: 0" "0" +45794-45874 am230x: bit: "Bit: 0" "0" +45874-46000 am230x: bit: "Bit: 1" "1" +45301-46000 am230x: byte: "Byte: 0x01" "0x01" +46000-46140 am230x: bit: "Bit: 1" "1" +46140-46220 am230x: bit: "Bit: 0" "0" +46220-46347 am230x: bit: "Bit: 1" "1" +46347-46427 am230x: bit: "Bit: 0" "0" +46427-46554 am230x: bit: "Bit: 1" "1" +46554-46633 am230x: bit: "Bit: 0" "0" +46633-46713 am230x: bit: "Bit: 0" "0" +46713-46839 am230x: bit: "Bit: 1" "1" +46000-46839 am230x: byte: "Byte: 0xa9" "0xa9" +45301-46839 am230x: temperature: "Temperature: 42.5 °C" "T = 42.5 °C" +46839-46977 am230x: bit: "Bit: 1" "1" +46977-47057 am230x: bit: "Bit: 0" "0" +47057-47137 am230x: bit: "Bit: 0" "0" +47137-47217 am230x: bit: "Bit: 0" "0" +47217-47297 am230x: bit: "Bit: 0" "0" +47297-47423 am230x: bit: "Bit: 1" "1" +47423-47550 am230x: bit: "Bit: 1" "1" +47550-47676 am230x: bit: "Bit: 1" "1" +46839-47676 am230x: byte: "Byte: 0x87" "0x87" +46839-47676 am230x: checksum: "Checksum: OK" "OK" +47676-47723 am230x: end: "End" "E" diff --git a/decoder/test/am230x/am2321_1mhz.output b/decoder/test/am230x/am2321_1mhz.output new file mode 100644 index 0000000..6f29a53 --- /dev/null +++ b/decoder/test/am230x/am2321_1mhz.output @@ -0,0 +1,51 @@ +49233-50224 am230x: start: "Start" "S" +50224-50388 am230x: response: "Response" "R" +50388-50468 am230x: bit: "Bit: 0" "0" +50468-50548 am230x: bit: "Bit: 0" "0" +50548-50629 am230x: bit: "Bit: 0" "0" +50629-50709 am230x: bit: "Bit: 0" "0" +50709-50789 am230x: bit: "Bit: 0" "0" +50789-50869 am230x: bit: "Bit: 0" "0" +50869-50950 am230x: bit: "Bit: 0" "0" +50950-51076 am230x: bit: "Bit: 1" "1" +50388-51076 am230x: byte: "Byte: 0x01" "0x01" +51076-51170 am230x: bit: "Bit: 0" "0" +51170-51250 am230x: bit: "Bit: 0" "0" +51250-51377 am230x: bit: "Bit: 1" "1" +51377-51504 am230x: bit: "Bit: 1" "1" +51504-51631 am230x: bit: "Bit: 1" "1" +51631-51712 am230x: bit: "Bit: 0" "0" +51712-51792 am230x: bit: "Bit: 0" "0" +51792-51918 am230x: bit: "Bit: 1" "1" +51076-51918 am230x: byte: "Byte: 0x39" "0x39" +50388-51918 am230x: humidity: "Humidity: 31.3 %" "RH = 31.3 %" +51918-52012 am230x: bit: "Bit: 0" "0" +52012-52092 am230x: bit: "Bit: 0" "0" +52092-52172 am230x: bit: "Bit: 0" "0" +52172-52253 am230x: bit: "Bit: 0" "0" +52253-52333 am230x: bit: "Bit: 0" "0" +52333-52413 am230x: bit: "Bit: 0" "0" +52413-52493 am230x: bit: "Bit: 0" "0" +52493-52573 am230x: bit: "Bit: 0" "0" +51918-52573 am230x: byte: "Byte: 0x00" "0x00" +52573-52713 am230x: bit: "Bit: 1" "1" +52713-52841 am230x: bit: "Bit: 1" "1" +52841-52921 am230x: bit: "Bit: 0" "0" +52921-53001 am230x: bit: "Bit: 0" "0" +53001-53081 am230x: bit: "Bit: 0" "0" +53081-53162 am230x: bit: "Bit: 0" "0" +53162-53242 am230x: bit: "Bit: 0" "0" +53242-53368 am230x: bit: "Bit: 1" "1" +52573-53368 am230x: byte: "Byte: 0xc1" "0xc1" +51918-53368 am230x: temperature: "Temperature: 19.3 °C" "T = 19.3 °C" +53368-53506 am230x: bit: "Bit: 1" "1" +53506-53633 am230x: bit: "Bit: 1" "1" +53633-53760 am230x: bit: "Bit: 1" "1" +53760-53887 am230x: bit: "Bit: 1" "1" +53887-54015 am230x: bit: "Bit: 1" "1" +54015-54095 am230x: bit: "Bit: 0" "0" +54095-54222 am230x: bit: "Bit: 1" "1" +54222-54348 am230x: bit: "Bit: 1" "1" +53368-54348 am230x: byte: "Byte: 0xfb" "0xfb" +53368-54348 am230x: checksum: "Checksum: OK" "OK" +54348-54395 am230x: end: "End" "E" diff --git a/decoder/test/am230x/am2322_1mhz.output b/decoder/test/am230x/am2322_1mhz.output new file mode 100644 index 0000000..1df8271 --- /dev/null +++ b/decoder/test/am230x/am2322_1mhz.output @@ -0,0 +1,51 @@ +35940-36932 am230x: start: "Start" "S" +36932-37097 am230x: response: "Response" "R" +37097-37178 am230x: bit: "Bit: 0" "0" +37178-37259 am230x: bit: "Bit: 0" "0" +37259-37340 am230x: bit: "Bit: 0" "0" +37340-37421 am230x: bit: "Bit: 0" "0" +37421-37502 am230x: bit: "Bit: 0" "0" +37502-37583 am230x: bit: "Bit: 0" "0" +37583-37712 am230x: bit: "Bit: 1" "1" +37712-37792 am230x: bit: "Bit: 0" "0" +37097-37792 am230x: byte: "Byte: 0x02" "0x02" +37792-37934 am230x: bit: "Bit: 1" "1" +37934-38015 am230x: bit: "Bit: 0" "0" +38015-38143 am230x: bit: "Bit: 1" "1" +38143-38272 am230x: bit: "Bit: 1" "1" +38272-38400 am230x: bit: "Bit: 1" "1" +38400-38529 am230x: bit: "Bit: 1" "1" +38529-38657 am230x: bit: "Bit: 1" "1" +38657-38785 am230x: bit: "Bit: 1" "1" +37792-38785 am230x: byte: "Byte: 0xbf" "0xbf" +37097-38785 am230x: humidity: "Humidity: 70.3 %" "RH = 70.3 %" +38785-38927 am230x: bit: "Bit: 1" "1" +38927-39008 am230x: bit: "Bit: 0" "0" +39008-39089 am230x: bit: "Bit: 0" "0" +39089-39170 am230x: bit: "Bit: 0" "0" +39170-39251 am230x: bit: "Bit: 0" "0" +39251-39332 am230x: bit: "Bit: 0" "0" +39332-39413 am230x: bit: "Bit: 0" "0" +39413-39493 am230x: bit: "Bit: 0" "0" +38785-39493 am230x: byte: "Byte: 0x80" "0x80" +39493-39588 am230x: bit: "Bit: 0" "0" +39588-39717 am230x: bit: "Bit: 1" "1" +39717-39798 am230x: bit: "Bit: 0" "0" +39798-39879 am230x: bit: "Bit: 0" "0" +39879-40007 am230x: bit: "Bit: 1" "1" +40007-40136 am230x: bit: "Bit: 1" "1" +40136-40264 am230x: bit: "Bit: 1" "1" +40264-40344 am230x: bit: "Bit: 0" "0" +39493-40344 am230x: byte: "Byte: 0x4e" "0x4e" +38785-40344 am230x: temperature: "Temperature: -7.8 °C" "T = -7.8 °C" +40344-40483 am230x: bit: "Bit: 1" "1" +40483-40564 am230x: bit: "Bit: 0" "0" +40564-40645 am230x: bit: "Bit: 0" "0" +40645-40726 am230x: bit: "Bit: 0" "0" +40726-40855 am230x: bit: "Bit: 1" "1" +40855-40983 am230x: bit: "Bit: 1" "1" +40983-41112 am230x: bit: "Bit: 1" "1" +41112-41239 am230x: bit: "Bit: 1" "1" +40344-41239 am230x: byte: "Byte: 0x8f" "0x8f" +40344-41239 am230x: checksum: "Checksum: OK" "OK" +41239-41287 am230x: end: "End" "E" diff --git a/decoder/test/am230x/test.conf b/decoder/test/am230x/test.conf index 8c3d7ff..8ecf027 100644 --- a/decoder/test/am230x/test.conf +++ b/decoder/test/am230x/test.conf @@ -18,6 +18,21 @@ test am2303 input am230x/am2303/am2303_1mhz.sr output am230x annotation match am2303_1mhz.output +test am2320 + protocol-decoder am230x channel sda=0 + input am230x/am2320/am2320_1mhz.sr + output am230x annotation match am2320_1mhz.output + +test am2321 + protocol-decoder am230x channel sda=0 + input am230x/am2321/am2321_1mhz.sr + output am230x annotation match am2321_1mhz.output + +test am2322 + protocol-decoder am230x channel sda=0 + input am230x/am2322/am2322_1mhz.sr + output am230x annotation match am2322_1mhz.output + test dht11 protocol-decoder am230x channel sda=5 option device=dht11 input am230x/dht11/dht11_1mhz.sr