]> sigrok.org Git - libsigrokdecode.git/commitdiff
i2c: Add binary tests.
authorBert Vermeulen <redacted>
Thu, 12 Dec 2013 12:30:36 +0000 (13:30 +0100)
committerBert Vermeulen <redacted>
Thu, 12 Dec 2013 12:30:36 +0000 (13:30 +0100)
decoders/i2c/test/test.conf
decoders/i2c/test/xfp_address_read.binary [new file with mode: 0644]
decoders/i2c/test/xfp_address_write.binary [new file with mode: 0644]
decoders/i2c/test/xfp_data_read.binary [new file with mode: 0644]
decoders/i2c/test/xfp_data_write.binary [new file with mode: 0644]

index 4e96a0091ac78b09d578bce7ddf9b4edd5d5bb7e..84a3d47378556b33ab4030d5dd76057ea07ea9e0 100644 (file)
@@ -10,3 +10,11 @@ test motherboard
        input i2c/gigabyte_6vle-vxl_i2c/gigabyte_6vle_vxl_i2c.sr
        output i2c annotation match gigabyte_6vle_vxl_i2c.output
 
+test xfp
+       protocol-decoder i2c probe scl=0 probe sda=1
+       input i2c/network-transceivers/xfp.sr
+       output i2c binary class data-read match xfp_data_read.binary
+       output i2c binary class data-write match xfp_data_write.binary
+       output i2c binary class address-read match xfp_address_read.binary
+       output i2c binary class address-write match xfp_address_write.binary
+
diff --git a/decoders/i2c/test/xfp_address_read.binary b/decoders/i2c/test/xfp_address_read.binary
new file mode 100644 (file)
index 0000000..f514e15
--- /dev/null
@@ -0,0 +1 @@
+PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\ No newline at end of file
diff --git a/decoders/i2c/test/xfp_address_write.binary b/decoders/i2c/test/xfp_address_write.binary
new file mode 100644 (file)
index 0000000..ea78966
--- /dev/null
@@ -0,0 +1 @@
+PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
\ No newline at end of file
diff --git a/decoders/i2c/test/xfp_data_read.binary b/decoders/i2c/test/xfp_data_read.binary
new file mode 100644 (file)
index 0000000..35a3b86
Binary files /dev/null and b/decoders/i2c/test/xfp_data_read.binary differ
diff --git a/decoders/i2c/test/xfp_data_write.binary b/decoders/i2c/test/xfp_data_write.binary
new file mode 100644 (file)
index 0000000..017b909
--- /dev/null
@@ -0,0 +1,2 @@
+\ 1\ 2\ 3\ 4\ 5\ 6\a\b       
+\v\f\r\ e\ f\10\11\12\13\14\15\16\17\18\19\1a\e\1c\1d\1e\1f !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\7f\80\81\82\83\84\85\86\87\88\89\8a\8b\8c\8d\8e\8f\90\91\92\93\94\95\96\97\98\99\9a\9b\9c\9d\9e\9f ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ
\ No newline at end of file