diff options
author | Uwe Hermann <uwe@hermann-uwe.de> | 2014-11-27 01:05:11 +0100 |
---|---|---|
committer | Uwe Hermann <uwe@hermann-uwe.de> | 2014-11-27 01:05:11 +0100 |
commit | 4b3d30ebf045f0a22198adeaf555fd46334b8200 (patch) | |
tree | e15d8336d78905b9ccfbef8f88bf72c7b2226e85 | |
parent | 021922274c9a92b2f3a830956084185f0a7a4ed2 (diff) | |
download | sigrok-test-4b3d30ebf045f0a22198adeaf555fd46334b8200.tar.gz sigrok-test-4b3d30ebf045f0a22198adeaf555fd46334b8200.zip |
am230x: Add a few AM230x/DHT11 tests.
-rw-r--r-- | decoder/test/am230x/am2301_1mhz.output | 102 | ||||
-rw-r--r-- | decoder/test/am230x/am2302_1mhz.output | 51 | ||||
-rw-r--r-- | decoder/test/am230x/am2303_1mhz.output | 51 | ||||
-rw-r--r-- | decoder/test/am230x/dht11_1mhz.output | 102 | ||||
-rw-r--r-- | decoder/test/am230x/test.conf | 24 |
5 files changed, 330 insertions, 0 deletions
diff --git a/decoder/test/am230x/am2301_1mhz.output b/decoder/test/am230x/am2301_1mhz.output new file mode 100644 index 0000000..73c1db4 --- /dev/null +++ b/decoder/test/am230x/am2301_1mhz.output @@ -0,0 +1,102 @@ +673573-693643 am230x: start: "Start" "S" +693643-693783 am230x: response: "Response" "R" +693783-693870 am230x: bit: "Bit: 0" "0" +693870-693955 am230x: bit: "Bit: 0" "0" +693955-694040 am230x: bit: "Bit: 0" "0" +694040-694125 am230x: bit: "Bit: 0" "0" +694125-694210 am230x: bit: "Bit: 0" "0" +694210-694295 am230x: bit: "Bit: 0" "0" +694295-694429 am230x: bit: "Bit: 1" "1" +694429-694514 am230x: bit: "Bit: 0" "0" +693783-694514 am230x: byte: "Byte: 0x02" "0x02" +694514-694603 am230x: bit: "Bit: 0" "0" +694603-694689 am230x: bit: "Bit: 0" "0" +694689-694774 am230x: bit: "Bit: 0" "0" +694774-694859 am230x: bit: "Bit: 0" "0" +694859-694993 am230x: bit: "Bit: 1" "1" +694993-695127 am230x: bit: "Bit: 1" "1" +695127-695261 am230x: bit: "Bit: 1" "1" +695261-695346 am230x: bit: "Bit: 0" "0" +694514-695346 am230x: byte: "Byte: 0x0e" "0x0e" +693783-695346 am230x: humidity: "Humidity: 52.6 %" "RH = 52.6 %" +695346-695435 am230x: bit: "Bit: 0" "0" +695435-695520 am230x: bit: "Bit: 0" "0" +695520-695605 am230x: bit: "Bit: 0" "0" +695605-695690 am230x: bit: "Bit: 0" "0" +695690-695775 am230x: bit: "Bit: 0" "0" +695775-695860 am230x: bit: "Bit: 0" "0" +695860-695945 am230x: bit: "Bit: 0" "0" +695945-696079 am230x: bit: "Bit: 1" "1" +695346-696079 am230x: byte: "Byte: 0x01" "0x01" +696079-696168 am230x: bit: "Bit: 0" "0" +696168-696253 am230x: bit: "Bit: 0" "0" +696253-696338 am230x: bit: "Bit: 0" "0" +696338-696423 am230x: bit: "Bit: 0" "0" +696423-696508 am230x: bit: "Bit: 0" "0" +696508-696593 am230x: bit: "Bit: 0" "0" +696593-696679 am230x: bit: "Bit: 0" "0" +696679-696764 am230x: bit: "Bit: 0" "0" +696079-696764 am230x: byte: "Byte: 0x00" "0x00" +695346-696764 am230x: temperature: "Temperature: 25.6 °C" "T = 25.6 °C" +696764-696853 am230x: bit: "Bit: 0" "0" +696853-696938 am230x: bit: "Bit: 0" "0" +696938-697023 am230x: bit: "Bit: 0" "0" +697023-697157 am230x: bit: "Bit: 1" "1" +697157-697242 am230x: bit: "Bit: 0" "0" +697242-697327 am230x: bit: "Bit: 0" "0" +697327-697412 am230x: bit: "Bit: 0" "0" +697412-697546 am230x: bit: "Bit: 1" "1" +696764-697546 am230x: byte: "Byte: 0x11" "0x11" +696764-697546 am230x: checksum: "Checksum: OK" "OK" +697546-697609 am230x: end: "End" "E" +2956015-2976084 am230x: start: "Start" "S" +2976084-2976225 am230x: response: "Response" "R" +2976225-2976312 am230x: bit: "Bit: 0" "0" +2976312-2976397 am230x: bit: "Bit: 0" "0" +2976397-2976482 am230x: bit: "Bit: 0" "0" +2976482-2976567 am230x: bit: "Bit: 0" "0" +2976567-2976652 am230x: bit: "Bit: 0" "0" +2976652-2976737 am230x: bit: "Bit: 0" "0" +2976737-2976871 am230x: bit: "Bit: 1" "1" +2976871-2976956 am230x: bit: "Bit: 0" "0" +2976225-2976956 am230x: byte: "Byte: 0x02" "0x02" +2976956-2977045 am230x: bit: "Bit: 0" "0" +2977045-2977130 am230x: bit: "Bit: 0" "0" +2977130-2977215 am230x: bit: "Bit: 0" "0" +2977215-2977300 am230x: bit: "Bit: 0" "0" +2977300-2977434 am230x: bit: "Bit: 1" "1" +2977434-2977568 am230x: bit: "Bit: 1" "1" +2977568-2977702 am230x: bit: "Bit: 1" "1" +2977702-2977788 am230x: bit: "Bit: 0" "0" +2976956-2977788 am230x: byte: "Byte: 0x0e" "0x0e" +2976225-2977788 am230x: humidity: "Humidity: 52.6 %" "RH = 52.6 %" +2977788-2977877 am230x: bit: "Bit: 0" "0" +2977877-2977962 am230x: bit: "Bit: 0" "0" +2977962-2978047 am230x: bit: "Bit: 0" "0" +2978047-2978132 am230x: bit: "Bit: 0" "0" +2978132-2978217 am230x: bit: "Bit: 0" "0" +2978217-2978302 am230x: bit: "Bit: 0" "0" +2978302-2978387 am230x: bit: "Bit: 0" "0" +2978387-2978521 am230x: bit: "Bit: 1" "1" +2977788-2978521 am230x: byte: "Byte: 0x01" "0x01" +2978521-2978610 am230x: bit: "Bit: 0" "0" +2978610-2978695 am230x: bit: "Bit: 0" "0" +2978695-2978780 am230x: bit: "Bit: 0" "0" +2978780-2978865 am230x: bit: "Bit: 0" "0" +2978865-2978950 am230x: bit: "Bit: 0" "0" +2978950-2979035 am230x: bit: "Bit: 0" "0" +2979035-2979120 am230x: bit: "Bit: 0" "0" +2979120-2979205 am230x: bit: "Bit: 0" "0" +2978521-2979205 am230x: byte: "Byte: 0x00" "0x00" +2977788-2979205 am230x: temperature: "Temperature: 25.6 °C" "T = 25.6 °C" +2979205-2979294 am230x: bit: "Bit: 0" "0" +2979294-2979379 am230x: bit: "Bit: 0" "0" +2979379-2979464 am230x: bit: "Bit: 0" "0" +2979464-2979598 am230x: bit: "Bit: 1" "1" +2979598-2979683 am230x: bit: "Bit: 0" "0" +2979683-2979769 am230x: bit: "Bit: 0" "0" +2979769-2979854 am230x: bit: "Bit: 0" "0" +2979854-2979988 am230x: bit: "Bit: 1" "1" +2979205-2979988 am230x: byte: "Byte: 0x11" "0x11" +2979205-2979988 am230x: checksum: "Checksum: OK" "OK" +2979988-2980051 am230x: end: "End" "E" diff --git a/decoder/test/am230x/am2302_1mhz.output b/decoder/test/am230x/am2302_1mhz.output new file mode 100644 index 0000000..eddde71 --- /dev/null +++ b/decoder/test/am230x/am2302_1mhz.output @@ -0,0 +1,51 @@ +23382-24370 am230x: start: "Start" "S" +24370-24530 am230x: response: "Response" "R" +24530-24611 am230x: bit: "Bit: 0" "0" +24611-24691 am230x: bit: "Bit: 0" "0" +24691-24772 am230x: bit: "Bit: 0" "0" +24772-24852 am230x: bit: "Bit: 0" "0" +24852-24933 am230x: bit: "Bit: 0" "0" +24933-25013 am230x: bit: "Bit: 0" "0" +25013-25140 am230x: bit: "Bit: 1" "1" +25140-25220 am230x: bit: "Bit: 0" "0" +24530-25220 am230x: byte: "Byte: 0x02" "0x02" +25220-25361 am230x: bit: "Bit: 1" "1" +25361-25488 am230x: bit: "Bit: 1" "1" +25488-25569 am230x: bit: "Bit: 0" "0" +25569-25696 am230x: bit: "Bit: 1" "1" +25696-25777 am230x: bit: "Bit: 0" "0" +25777-25857 am230x: bit: "Bit: 0" "0" +25857-25937 am230x: bit: "Bit: 0" "0" +25937-26064 am230x: bit: "Bit: 1" "1" +25220-26064 am230x: byte: "Byte: 0xd1" "0xd1" +24530-26064 am230x: humidity: "Humidity: 72.1 %" "RH = 72.1 %" +26064-26158 am230x: bit: "Bit: 0" "0" +26158-26238 am230x: bit: "Bit: 0" "0" +26238-26319 am230x: bit: "Bit: 0" "0" +26319-26399 am230x: bit: "Bit: 0" "0" +26399-26480 am230x: bit: "Bit: 0" "0" +26480-26560 am230x: bit: "Bit: 0" "0" +26560-26641 am230x: bit: "Bit: 0" "0" +26641-26720 am230x: bit: "Bit: 0" "0" +26064-26720 am230x: byte: "Byte: 0x00" "0x00" +26720-26861 am230x: bit: "Bit: 1" "1" +26861-26988 am230x: bit: "Bit: 1" "1" +26988-27116 am230x: bit: "Bit: 1" "1" +27116-27196 am230x: bit: "Bit: 0" "0" +27196-27324 am230x: bit: "Bit: 1" "1" +27324-27451 am230x: bit: "Bit: 1" "1" +27451-27579 am230x: bit: "Bit: 1" "1" +27579-27658 am230x: bit: "Bit: 0" "0" +26720-27658 am230x: byte: "Byte: 0xee" "0xee" +26064-27658 am230x: temperature: "Temperature: 23.8 °C" "T = 23.8 °C" +27658-27796 am230x: bit: "Bit: 1" "1" +27796-27923 am230x: bit: "Bit: 1" "1" +27923-28004 am230x: bit: "Bit: 0" "0" +28004-28084 am230x: bit: "Bit: 0" "0" +28084-28165 am230x: bit: "Bit: 0" "0" +28165-28245 am230x: bit: "Bit: 0" "0" +28245-28326 am230x: bit: "Bit: 0" "0" +28326-28452 am230x: bit: "Bit: 1" "1" +27658-28452 am230x: byte: "Byte: 0xc1" "0xc1" +27658-28452 am230x: checksum: "Checksum: OK" "OK" +28452-28499 am230x: end: "End" "E" diff --git a/decoder/test/am230x/am2303_1mhz.output b/decoder/test/am230x/am2303_1mhz.output new file mode 100644 index 0000000..56a005d --- /dev/null +++ b/decoder/test/am230x/am2303_1mhz.output @@ -0,0 +1,51 @@ +44147-45138 am230x: start: "Start" "S" +45138-45298 am230x: response: "Response" "R" +45298-45378 am230x: bit: "Bit: 0" "0" +45378-45458 am230x: bit: "Bit: 0" "0" +45458-45538 am230x: bit: "Bit: 0" "0" +45538-45618 am230x: bit: "Bit: 0" "0" +45618-45698 am230x: bit: "Bit: 0" "0" +45698-45779 am230x: bit: "Bit: 0" "0" +45779-45906 am230x: bit: "Bit: 1" "1" +45906-45985 am230x: bit: "Bit: 0" "0" +45298-45985 am230x: byte: "Byte: 0x02" "0x02" +45985-46079 am230x: bit: "Bit: 0" "0" +46079-46159 am230x: bit: "Bit: 0" "0" +46159-46286 am230x: bit: "Bit: 1" "1" +46286-46366 am230x: bit: "Bit: 0" "0" +46366-46494 am230x: bit: "Bit: 1" "1" +46494-46574 am230x: bit: "Bit: 0" "0" +46574-46701 am230x: bit: "Bit: 1" "1" +46701-46827 am230x: bit: "Bit: 1" "1" +45985-46827 am230x: byte: "Byte: 0x2b" "0x2b" +45298-46827 am230x: humidity: "Humidity: 55.5 %" "RH = 55.5 %" +46827-46921 am230x: bit: "Bit: 0" "0" +46921-47001 am230x: bit: "Bit: 0" "0" +47001-47081 am230x: bit: "Bit: 0" "0" +47081-47161 am230x: bit: "Bit: 0" "0" +47161-47242 am230x: bit: "Bit: 0" "0" +47242-47322 am230x: bit: "Bit: 0" "0" +47322-47402 am230x: bit: "Bit: 0" "0" +47402-47481 am230x: bit: "Bit: 0" "0" +46827-47481 am230x: byte: "Byte: 0x00" "0x00" +47481-47622 am230x: bit: "Bit: 1" "1" +47622-47749 am230x: bit: "Bit: 1" "1" +47749-47876 am230x: bit: "Bit: 1" "1" +47876-47957 am230x: bit: "Bit: 0" "0" +47957-48084 am230x: bit: "Bit: 1" "1" +48084-48164 am230x: bit: "Bit: 0" "0" +48164-48244 am230x: bit: "Bit: 0" "0" +48244-48323 am230x: bit: "Bit: 0" "0" +47481-48323 am230x: byte: "Byte: 0xe8" "0xe8" +46827-48323 am230x: temperature: "Temperature: 23.2 °C" "T = 23.2 °C" +48323-48414 am230x: bit: "Bit: 0" "0" +48414-48495 am230x: bit: "Bit: 0" "0" +48495-48575 am230x: bit: "Bit: 0" "0" +48575-48702 am230x: bit: "Bit: 1" "1" +48702-48782 am230x: bit: "Bit: 0" "0" +48782-48909 am230x: bit: "Bit: 1" "1" +48909-48990 am230x: bit: "Bit: 0" "0" +48990-49116 am230x: bit: "Bit: 1" "1" +48323-49116 am230x: byte: "Byte: 0x15" "0x15" +48323-49116 am230x: checksum: "Checksum: OK" "OK" +49116-49163 am230x: end: "End" "E" diff --git a/decoder/test/am230x/dht11_1mhz.output b/decoder/test/am230x/dht11_1mhz.output new file mode 100644 index 0000000..209a9cc --- /dev/null +++ b/decoder/test/am230x/dht11_1mhz.output @@ -0,0 +1,102 @@ +1892253-1912320 am230x: start: "Start" "S" +1912320-1912457 am230x: response: "Response" "R" +1912457-1912535 am230x: bit: "Bit: 0" "0" +1912535-1912613 am230x: bit: "Bit: 0" "0" +1912613-1912738 am230x: bit: "Bit: 1" "1" +1912738-1912816 am230x: bit: "Bit: 0" "0" +1912816-1912894 am230x: bit: "Bit: 0" "0" +1912894-1913019 am230x: bit: "Bit: 1" "1" +1913019-1913097 am230x: bit: "Bit: 0" "0" +1913097-1913175 am230x: bit: "Bit: 0" "0" +1912457-1913175 am230x: byte: "Byte: 0x24" "0x24" +1913175-1913253 am230x: bit: "Bit: 0" "0" +1913253-1913331 am230x: bit: "Bit: 0" "0" +1913331-1913409 am230x: bit: "Bit: 0" "0" +1913409-1913487 am230x: bit: "Bit: 0" "0" +1913487-1913564 am230x: bit: "Bit: 0" "0" +1913564-1913642 am230x: bit: "Bit: 0" "0" +1913642-1913720 am230x: bit: "Bit: 0" "0" +1913720-1913800 am230x: bit: "Bit: 0" "0" +1913175-1913800 am230x: byte: "Byte: 0x00" "0x00" +1912457-1913800 am230x: humidity: "Humidity: 36.0 %" "RH = 36.0 %" +1913800-1913878 am230x: bit: "Bit: 0" "0" +1913878-1913956 am230x: bit: "Bit: 0" "0" +1913956-1914034 am230x: bit: "Bit: 0" "0" +1914034-1914158 am230x: bit: "Bit: 1" "1" +1914158-1914283 am230x: bit: "Bit: 1" "1" +1914283-1914361 am230x: bit: "Bit: 0" "0" +1914361-1914486 am230x: bit: "Bit: 1" "1" +1914486-1914611 am230x: bit: "Bit: 1" "1" +1913800-1914611 am230x: byte: "Byte: 0x1b" "0x1b" +1914611-1914689 am230x: bit: "Bit: 0" "0" +1914689-1914767 am230x: bit: "Bit: 0" "0" +1914767-1914845 am230x: bit: "Bit: 0" "0" +1914845-1914923 am230x: bit: "Bit: 0" "0" +1914923-1915001 am230x: bit: "Bit: 0" "0" +1915001-1915079 am230x: bit: "Bit: 0" "0" +1915079-1915157 am230x: bit: "Bit: 0" "0" +1915157-1915236 am230x: bit: "Bit: 0" "0" +1914611-1915236 am230x: byte: "Byte: 0x00" "0x00" +1913800-1915236 am230x: temperature: "Temperature: 27.0 °C" "T = 27.0 °C" +1915236-1915314 am230x: bit: "Bit: 0" "0" +1915314-1915392 am230x: bit: "Bit: 0" "0" +1915392-1915517 am230x: bit: "Bit: 1" "1" +1915517-1915642 am230x: bit: "Bit: 1" "1" +1915642-1915767 am230x: bit: "Bit: 1" "1" +1915767-1915892 am230x: bit: "Bit: 1" "1" +1915892-1916016 am230x: bit: "Bit: 1" "1" +1916016-1916139 am230x: bit: "Bit: 1" "1" +1915236-1916139 am230x: byte: "Byte: 0x3f" "0x3f" +1915236-1916139 am230x: checksum: "Checksum: OK" "OK" +1916139-1916196 am230x: end: "End" "E" +4175472-4195539 am230x: start: "Start" "S" +4195539-4195677 am230x: response: "Response" "R" +4195677-4195755 am230x: bit: "Bit: 0" "0" +4195755-4195833 am230x: bit: "Bit: 0" "0" +4195833-4195957 am230x: bit: "Bit: 1" "1" +4195957-4196035 am230x: bit: "Bit: 0" "0" +4196035-4196113 am230x: bit: "Bit: 0" "0" +4196113-4196238 am230x: bit: "Bit: 1" "1" +4196238-4196316 am230x: bit: "Bit: 0" "0" +4196316-4196394 am230x: bit: "Bit: 0" "0" +4195677-4196394 am230x: byte: "Byte: 0x24" "0x24" +4196394-4196472 am230x: bit: "Bit: 0" "0" +4196472-4196550 am230x: bit: "Bit: 0" "0" +4196550-4196628 am230x: bit: "Bit: 0" "0" +4196628-4196706 am230x: bit: "Bit: 0" "0" +4196706-4196784 am230x: bit: "Bit: 0" "0" +4196784-4196862 am230x: bit: "Bit: 0" "0" +4196862-4196940 am230x: bit: "Bit: 0" "0" +4196940-4197019 am230x: bit: "Bit: 0" "0" +4196394-4197019 am230x: byte: "Byte: 0x00" "0x00" +4195677-4197019 am230x: humidity: "Humidity: 36.0 %" "RH = 36.0 %" +4197019-4197097 am230x: bit: "Bit: 0" "0" +4197097-4197175 am230x: bit: "Bit: 0" "0" +4197175-4197253 am230x: bit: "Bit: 0" "0" +4197253-4197378 am230x: bit: "Bit: 1" "1" +4197378-4197503 am230x: bit: "Bit: 1" "1" +4197503-4197581 am230x: bit: "Bit: 0" "0" +4197581-4197706 am230x: bit: "Bit: 1" "1" +4197706-4197830 am230x: bit: "Bit: 1" "1" +4197019-4197830 am230x: byte: "Byte: 0x1b" "0x1b" +4197830-4197908 am230x: bit: "Bit: 0" "0" +4197908-4197986 am230x: bit: "Bit: 0" "0" +4197986-4198064 am230x: bit: "Bit: 0" "0" +4198064-4198142 am230x: bit: "Bit: 0" "0" +4198142-4198220 am230x: bit: "Bit: 0" "0" +4198220-4198298 am230x: bit: "Bit: 0" "0" +4198298-4198376 am230x: bit: "Bit: 0" "0" +4198376-4198455 am230x: bit: "Bit: 0" "0" +4197830-4198455 am230x: byte: "Byte: 0x00" "0x00" +4197019-4198455 am230x: temperature: "Temperature: 27.0 °C" "T = 27.0 °C" +4198455-4198533 am230x: bit: "Bit: 0" "0" +4198533-4198611 am230x: bit: "Bit: 0" "0" +4198611-4198736 am230x: bit: "Bit: 1" "1" +4198736-4198861 am230x: bit: "Bit: 1" "1" +4198861-4198986 am230x: bit: "Bit: 1" "1" +4198986-4199111 am230x: bit: "Bit: 1" "1" +4199111-4199236 am230x: bit: "Bit: 1" "1" +4199236-4199358 am230x: bit: "Bit: 1" "1" +4198455-4199358 am230x: byte: "Byte: 0x3f" "0x3f" +4198455-4199358 am230x: checksum: "Checksum: OK" "OK" +4199358-4199415 am230x: end: "End" "E" diff --git a/decoder/test/am230x/test.conf b/decoder/test/am230x/test.conf new file mode 100644 index 0000000..8c3d7ff --- /dev/null +++ b/decoder/test/am230x/test.conf @@ -0,0 +1,24 @@ +test exception_samplerate + protocol-decoder am230x + input misc/no-samplerate.sr + output am230x exception match SamplerateError + +test am2301 + protocol-decoder am230x channel sda=5 + input am230x/am2301/am2301_1mhz.sr + output am230x annotation match am2301_1mhz.output + +test am2302 + protocol-decoder am230x channel sda=0 + input am230x/am2302/am2302_1mhz.sr + output am230x annotation match am2302_1mhz.output + +test am2303 + protocol-decoder am230x channel sda=0 + input am230x/am2303/am2303_1mhz.sr + output am230x annotation match am2303_1mhz.output + +test dht11 + protocol-decoder am230x channel sda=5 option device=dht11 + input am230x/dht11/dht11_1mhz.sr + output am230x annotation match dht11_1mhz.output |