summaryrefslogtreecommitdiff
path: root/decoders/i2c
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2013-12-12 13:30:36 +0100
committerBert Vermeulen <bert@biot.com>2013-12-12 13:30:36 +0100
commite6449805fc8d56d0d8ff4003d123437e799b242f (patch)
treedbc96bec2b5ad3bb014094f6d36f11558806d14e /decoders/i2c
parentd7d693b51692aa7aae90f3ca8caf5a8e9c581ed9 (diff)
downloadlibsigrokdecode-e6449805fc8d56d0d8ff4003d123437e799b242f.tar.gz
libsigrokdecode-e6449805fc8d56d0d8ff4003d123437e799b242f.zip
i2c: Add binary tests.
Diffstat (limited to 'decoders/i2c')
-rw-r--r--decoders/i2c/test/test.conf8
-rw-r--r--decoders/i2c/test/xfp_address_read.binary1
-rw-r--r--decoders/i2c/test/xfp_address_write.binary1
-rw-r--r--decoders/i2c/test/xfp_data_read.binarybin0 -> 256 bytes
-rw-r--r--decoders/i2c/test/xfp_data_write.binary2
5 files changed, 12 insertions, 0 deletions
diff --git a/decoders/i2c/test/test.conf b/decoders/i2c/test/test.conf
index 4e96a00..84a3d47 100644
--- a/decoders/i2c/test/test.conf
+++ b/decoders/i2c/test/test.conf
@@ -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
index 0000000..f514e15
--- /dev/null
+++ b/decoders/i2c/test/xfp_address_read.binary
@@ -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
index 0000000..ea78966
--- /dev/null
+++ b/decoders/i2c/test/xfp_address_write.binary
@@ -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
index 0000000..35a3b86
--- /dev/null
+++ b/decoders/i2c/test/xfp_data_read.binary
Binary files differ
diff --git a/decoders/i2c/test/xfp_data_write.binary b/decoders/i2c/test/xfp_data_write.binary
new file mode 100644
index 0000000..017b909
--- /dev/null
+++ b/decoders/i2c/test/xfp_data_write.binary
@@ -0,0 +1,2 @@
+
+  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ \ No newline at end of file