]> sigrok.org Git - sigrok-test.git/commitdiff
i2c: Add ROHM BH1750VFI test-cases.
authorUwe Hermann <redacted>
Wed, 17 Apr 2019 18:09:07 +0000 (20:09 +0200)
committerUwe Hermann <redacted>
Wed, 17 Apr 2019 18:09:07 +0000 (20:09 +0200)
13 files changed:
decoder/test/i2c/bh1750_h2resolutionmode.bin_address_read [new file with mode: 0644]
decoder/test/i2c/bh1750_h2resolutionmode.bin_address_write [new file with mode: 0644]
decoder/test/i2c/bh1750_h2resolutionmode.bin_data_read [new file with mode: 0644]
decoder/test/i2c/bh1750_h2resolutionmode.bin_data_write [new file with mode: 0644]
decoder/test/i2c/bh1750_h2resolutionmode.output [new file with mode: 0644]
decoder/test/i2c/bh1750_h2resolutionmode.python [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.bin_address_read [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.bin_address_write [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.bin_data_read [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.bin_data_write [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.output [new file with mode: 0644]
decoder/test/i2c/bh1750_hresolutionmode.python [new file with mode: 0644]
decoder/test/i2c/test.conf

diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.bin_address_read b/decoder/test/i2c/bh1750_h2resolutionmode.bin_address_read
new file mode 100644 (file)
index 0000000..10363f4
--- /dev/null
@@ -0,0 +1 @@
+469238-469278 i2c: 23
diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.bin_address_write b/decoder/test/i2c/bh1750_h2resolutionmode.bin_address_write
new file mode 100644 (file)
index 0000000..b5c391d
--- /dev/null
@@ -0,0 +1,8 @@
+5007-5047 i2c: 23
+5127-5167 i2c: 23
+5234-5274 i2c: 23
+5344-5384 i2c: 23
+5511-5551 i2c: 23
+5618-5658 i2c: 23
+5725-5765 i2c: 23
+5895-5935 i2c: 23
diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.bin_data_read b/decoder/test/i2c/bh1750_h2resolutionmode.bin_data_read
new file mode 100644 (file)
index 0000000..b575d46
--- /dev/null
@@ -0,0 +1,2 @@
+469285-469325 i2c: 00
+469333-469373 i2c: e2
diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.bin_data_write b/decoder/test/i2c/bh1750_h2resolutionmode.bin_data_write
new file mode 100644 (file)
index 0000000..f22534b
--- /dev/null
@@ -0,0 +1,8 @@
+5055-5095 i2c: 01
+5175-5215 i2c: 42
+5282-5322 i2c: 65
+5391-5431 i2c: 21
+5559-5599 i2c: 47
+5666-5706 i2c: 7e
+5772-5812 i2c: 21
+5942-5982 i2c: 21
diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.output b/decoder/test/i2c/bh1750_h2resolutionmode.output
new file mode 100644 (file)
index 0000000..3ffa9b2
--- /dev/null
@@ -0,0 +1,213 @@
+5000-5000 i2c: start: "Start" "S"
+5042-5047 i2c: bit: "0"
+5037-5042 i2c: bit: "1"
+5032-5037 i2c: bit: "1"
+5027-5032 i2c: bit: "0"
+5022-5027 i2c: bit: "0"
+5017-5022 i2c: bit: "0"
+5012-5017 i2c: bit: "1"
+5007-5012 i2c: bit: "0"
+5042-5047 i2c: address-write: "Write" "Wr" "W"
+5007-5042 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5047-5052 i2c: ack: "ACK" "A"
+5090-5095 i2c: bit: "1"
+5085-5090 i2c: bit: "0"
+5080-5085 i2c: bit: "0"
+5075-5080 i2c: bit: "0"
+5070-5075 i2c: bit: "0"
+5065-5070 i2c: bit: "0"
+5060-5065 i2c: bit: "0"
+5055-5060 i2c: bit: "0"
+5055-5095 i2c: data-write: "Data write: 01" "DW: 01" "01"
+5095-5100 i2c: ack: "ACK" "A"
+5105-5105 i2c: stop: "Stop" "P"
+5120-5120 i2c: start: "Start" "S"
+5162-5167 i2c: bit: "0"
+5157-5162 i2c: bit: "1"
+5152-5157 i2c: bit: "1"
+5147-5152 i2c: bit: "0"
+5142-5147 i2c: bit: "0"
+5137-5142 i2c: bit: "0"
+5132-5137 i2c: bit: "1"
+5127-5132 i2c: bit: "0"
+5162-5167 i2c: address-write: "Write" "Wr" "W"
+5127-5162 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5167-5172 i2c: ack: "ACK" "A"
+5210-5215 i2c: bit: "0"
+5205-5210 i2c: bit: "1"
+5200-5205 i2c: bit: "0"
+5195-5200 i2c: bit: "0"
+5190-5195 i2c: bit: "0"
+5185-5190 i2c: bit: "0"
+5180-5185 i2c: bit: "1"
+5175-5180 i2c: bit: "0"
+5175-5215 i2c: data-write: "Data write: 42" "DW: 42" "42"
+5215-5220 i2c: ack: "ACK" "A"
+5225-5225 i2c: repeat-start: "Start repeat" "Sr"
+5269-5274 i2c: bit: "0"
+5264-5269 i2c: bit: "1"
+5259-5264 i2c: bit: "1"
+5254-5259 i2c: bit: "0"
+5249-5254 i2c: bit: "0"
+5244-5249 i2c: bit: "0"
+5239-5244 i2c: bit: "1"
+5234-5239 i2c: bit: "0"
+5269-5274 i2c: address-write: "Write" "Wr" "W"
+5234-5269 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5274-5279 i2c: ack: "ACK" "A"
+5317-5322 i2c: bit: "1"
+5312-5317 i2c: bit: "0"
+5307-5312 i2c: bit: "1"
+5302-5307 i2c: bit: "0"
+5297-5302 i2c: bit: "0"
+5292-5297 i2c: bit: "1"
+5287-5292 i2c: bit: "1"
+5282-5287 i2c: bit: "0"
+5282-5322 i2c: data-write: "Data write: 65" "DW: 65" "65"
+5322-5327 i2c: ack: "ACK" "A"
+5332-5332 i2c: repeat-start: "Start repeat" "Sr"
+5379-5384 i2c: bit: "0"
+5374-5379 i2c: bit: "1"
+5369-5374 i2c: bit: "1"
+5364-5369 i2c: bit: "0"
+5359-5364 i2c: bit: "0"
+5354-5359 i2c: bit: "0"
+5349-5354 i2c: bit: "1"
+5344-5349 i2c: bit: "0"
+5379-5384 i2c: address-write: "Write" "Wr" "W"
+5344-5379 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5384-5389 i2c: ack: "ACK" "A"
+5426-5431 i2c: bit: "1"
+5421-5426 i2c: bit: "0"
+5416-5421 i2c: bit: "0"
+5411-5416 i2c: bit: "0"
+5406-5411 i2c: bit: "0"
+5401-5406 i2c: bit: "1"
+5396-5401 i2c: bit: "0"
+5391-5396 i2c: bit: "0"
+5391-5431 i2c: data-write: "Data write: 21" "DW: 21" "21"
+5431-5436 i2c: ack: "ACK" "A"
+5441-5441 i2c: stop: "Stop" "P"
+5504-5504 i2c: start: "Start" "S"
+5546-5551 i2c: bit: "0"
+5541-5546 i2c: bit: "1"
+5536-5541 i2c: bit: "1"
+5531-5536 i2c: bit: "0"
+5526-5531 i2c: bit: "0"
+5521-5526 i2c: bit: "0"
+5516-5521 i2c: bit: "1"
+5511-5516 i2c: bit: "0"
+5546-5551 i2c: address-write: "Write" "Wr" "W"
+5511-5546 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5551-5556 i2c: ack: "ACK" "A"
+5594-5599 i2c: bit: "1"
+5589-5594 i2c: bit: "1"
+5584-5589 i2c: bit: "1"
+5579-5584 i2c: bit: "0"
+5574-5579 i2c: bit: "0"
+5569-5574 i2c: bit: "0"
+5564-5569 i2c: bit: "1"
+5559-5564 i2c: bit: "0"
+5559-5599 i2c: data-write: "Data write: 47" "DW: 47" "47"
+5599-5604 i2c: ack: "ACK" "A"
+5609-5609 i2c: repeat-start: "Start repeat" "Sr"
+5653-5658 i2c: bit: "0"
+5648-5653 i2c: bit: "1"
+5643-5648 i2c: bit: "1"
+5638-5643 i2c: bit: "0"
+5633-5638 i2c: bit: "0"
+5628-5633 i2c: bit: "0"
+5623-5628 i2c: bit: "1"
+5618-5623 i2c: bit: "0"
+5653-5658 i2c: address-write: "Write" "Wr" "W"
+5618-5653 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5658-5663 i2c: ack: "ACK" "A"
+5701-5706 i2c: bit: "0"
+5696-5701 i2c: bit: "1"
+5691-5696 i2c: bit: "1"
+5686-5691 i2c: bit: "1"
+5681-5686 i2c: bit: "1"
+5676-5681 i2c: bit: "1"
+5671-5676 i2c: bit: "1"
+5666-5671 i2c: bit: "0"
+5666-5706 i2c: data-write: "Data write: 7E" "DW: 7E" "7E"
+5706-5711 i2c: ack: "ACK" "A"
+5716-5716 i2c: repeat-start: "Start repeat" "Sr"
+5760-5765 i2c: bit: "0"
+5755-5760 i2c: bit: "1"
+5750-5755 i2c: bit: "1"
+5745-5750 i2c: bit: "0"
+5740-5745 i2c: bit: "0"
+5735-5740 i2c: bit: "0"
+5730-5735 i2c: bit: "1"
+5725-5730 i2c: bit: "0"
+5760-5765 i2c: address-write: "Write" "Wr" "W"
+5725-5760 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5765-5770 i2c: ack: "ACK" "A"
+5807-5812 i2c: bit: "1"
+5802-5807 i2c: bit: "0"
+5797-5802 i2c: bit: "0"
+5792-5797 i2c: bit: "0"
+5787-5792 i2c: bit: "0"
+5782-5787 i2c: bit: "1"
+5777-5782 i2c: bit: "0"
+5772-5777 i2c: bit: "0"
+5772-5812 i2c: data-write: "Data write: 21" "DW: 21" "21"
+5812-5817 i2c: ack: "ACK" "A"
+5822-5822 i2c: stop: "Stop" "P"
+5887-5887 i2c: start: "Start" "S"
+5930-5935 i2c: bit: "0"
+5925-5930 i2c: bit: "1"
+5920-5925 i2c: bit: "1"
+5915-5920 i2c: bit: "0"
+5910-5915 i2c: bit: "0"
+5905-5910 i2c: bit: "0"
+5900-5905 i2c: bit: "1"
+5895-5900 i2c: bit: "0"
+5930-5935 i2c: address-write: "Write" "Wr" "W"
+5895-5930 i2c: address-write: "Address write: 23" "AW: 23" "23"
+5935-5940 i2c: ack: "ACK" "A"
+5977-5982 i2c: bit: "1"
+5972-5977 i2c: bit: "0"
+5967-5972 i2c: bit: "0"
+5962-5967 i2c: bit: "0"
+5957-5962 i2c: bit: "0"
+5952-5957 i2c: bit: "1"
+5947-5952 i2c: bit: "0"
+5942-5947 i2c: bit: "0"
+5942-5982 i2c: data-write: "Data write: 21" "DW: 21" "21"
+5982-5987 i2c: ack: "ACK" "A"
+5992-5992 i2c: stop: "Stop" "P"
+469231-469231 i2c: start: "Start" "S"
+469273-469278 i2c: bit: "1"
+469268-469273 i2c: bit: "1"
+469263-469268 i2c: bit: "1"
+469258-469263 i2c: bit: "0"
+469253-469258 i2c: bit: "0"
+469248-469253 i2c: bit: "0"
+469243-469248 i2c: bit: "1"
+469238-469243 i2c: bit: "0"
+469273-469278 i2c: address-read: "Read" "Rd" "R"
+469238-469273 i2c: address-read: "Address read: 23" "AR: 23" "23"
+469278-469283 i2c: ack: "ACK" "A"
+469320-469325 i2c: bit: "0"
+469315-469320 i2c: bit: "0"
+469310-469315 i2c: bit: "0"
+469305-469310 i2c: bit: "0"
+469300-469305 i2c: bit: "0"
+469295-469300 i2c: bit: "0"
+469290-469295 i2c: bit: "0"
+469285-469290 i2c: bit: "0"
+469285-469325 i2c: data-read: "Data read: 00" "DR: 00" "00"
+469325-469330 i2c: ack: "ACK" "A"
+469368-469373 i2c: bit: "0"
+469363-469368 i2c: bit: "1"
+469358-469363 i2c: bit: "0"
+469353-469358 i2c: bit: "0"
+469348-469353 i2c: bit: "0"
+469343-469348 i2c: bit: "1"
+469338-469343 i2c: bit: "1"
+469333-469338 i2c: bit: "1"
+469333-469373 i2c: data-read: "Data read: E2" "DR: E2" "E2"
+469373-469378 i2c: nack: "NACK" "N"
+469383-469383 i2c: stop: "Stop" "P"
diff --git a/decoder/test/i2c/bh1750_h2resolutionmode.python b/decoder/test/i2c/bh1750_h2resolutionmode.python
new file mode 100644 (file)
index 0000000..4a41fd8
--- /dev/null
@@ -0,0 +1,71 @@
+5000-5000 i2c: ['START', None]
+5007-5047 i2c: ['BITS', [[0, 5042, 5047], [1, 5037, 5042], [1, 5032, 5037], [0, 5027, 5032], [0, 5022, 5027], [0, 5017, 5022], [1, 5012, 5017], [0, 5007, 5012]]]
+5007-5047 i2c: ['ADDRESS WRITE', 35]
+5047-5052 i2c: ['ACK', None]
+5055-5095 i2c: ['BITS', [[1, 5090, 5095], [0, 5085, 5090], [0, 5080, 5085], [0, 5075, 5080], [0, 5070, 5075], [0, 5065, 5070], [0, 5060, 5065], [0, 5055, 5060]]]
+5055-5095 i2c: ['DATA WRITE', 1]
+5095-5100 i2c: ['ACK', None]
+5105-5105 i2c: ['STOP', None]
+5120-5120 i2c: ['START', None]
+5127-5167 i2c: ['BITS', [[0, 5162, 5167], [1, 5157, 5162], [1, 5152, 5157], [0, 5147, 5152], [0, 5142, 5147], [0, 5137, 5142], [1, 5132, 5137], [0, 5127, 5132]]]
+5127-5167 i2c: ['ADDRESS WRITE', 35]
+5167-5172 i2c: ['ACK', None]
+5175-5215 i2c: ['BITS', [[0, 5210, 5215], [1, 5205, 5210], [0, 5200, 5205], [0, 5195, 5200], [0, 5190, 5195], [0, 5185, 5190], [1, 5180, 5185], [0, 5175, 5180]]]
+5175-5215 i2c: ['DATA WRITE', 66]
+5215-5220 i2c: ['ACK', None]
+5225-5225 i2c: ['START REPEAT', None]
+5234-5274 i2c: ['BITS', [[0, 5269, 5274], [1, 5264, 5269], [1, 5259, 5264], [0, 5254, 5259], [0, 5249, 5254], [0, 5244, 5249], [1, 5239, 5244], [0, 5234, 5239]]]
+5234-5274 i2c: ['ADDRESS WRITE', 35]
+5274-5279 i2c: ['ACK', None]
+5282-5322 i2c: ['BITS', [[1, 5317, 5322], [0, 5312, 5317], [1, 5307, 5312], [0, 5302, 5307], [0, 5297, 5302], [1, 5292, 5297], [1, 5287, 5292], [0, 5282, 5287]]]
+5282-5322 i2c: ['DATA WRITE', 101]
+5322-5327 i2c: ['ACK', None]
+5332-5332 i2c: ['START REPEAT', None]
+5344-5384 i2c: ['BITS', [[0, 5379, 5384], [1, 5374, 5379], [1, 5369, 5374], [0, 5364, 5369], [0, 5359, 5364], [0, 5354, 5359], [1, 5349, 5354], [0, 5344, 5349]]]
+5344-5384 i2c: ['ADDRESS WRITE', 35]
+5384-5389 i2c: ['ACK', None]
+5391-5431 i2c: ['BITS', [[1, 5426, 5431], [0, 5421, 5426], [0, 5416, 5421], [0, 5411, 5416], [0, 5406, 5411], [1, 5401, 5406], [0, 5396, 5401], [0, 5391, 5396]]]
+5391-5431 i2c: ['DATA WRITE', 33]
+5431-5436 i2c: ['ACK', None]
+5441-5441 i2c: ['STOP', None]
+5504-5504 i2c: ['START', None]
+5511-5551 i2c: ['BITS', [[0, 5546, 5551], [1, 5541, 5546], [1, 5536, 5541], [0, 5531, 5536], [0, 5526, 5531], [0, 5521, 5526], [1, 5516, 5521], [0, 5511, 5516]]]
+5511-5551 i2c: ['ADDRESS WRITE', 35]
+5551-5556 i2c: ['ACK', None]
+5559-5599 i2c: ['BITS', [[1, 5594, 5599], [1, 5589, 5594], [1, 5584, 5589], [0, 5579, 5584], [0, 5574, 5579], [0, 5569, 5574], [1, 5564, 5569], [0, 5559, 5564]]]
+5559-5599 i2c: ['DATA WRITE', 71]
+5599-5604 i2c: ['ACK', None]
+5609-5609 i2c: ['START REPEAT', None]
+5618-5658 i2c: ['BITS', [[0, 5653, 5658], [1, 5648, 5653], [1, 5643, 5648], [0, 5638, 5643], [0, 5633, 5638], [0, 5628, 5633], [1, 5623, 5628], [0, 5618, 5623]]]
+5618-5658 i2c: ['ADDRESS WRITE', 35]
+5658-5663 i2c: ['ACK', None]
+5666-5706 i2c: ['BITS', [[0, 5701, 5706], [1, 5696, 5701], [1, 5691, 5696], [1, 5686, 5691], [1, 5681, 5686], [1, 5676, 5681], [1, 5671, 5676], [0, 5666, 5671]]]
+5666-5706 i2c: ['DATA WRITE', 126]
+5706-5711 i2c: ['ACK', None]
+5716-5716 i2c: ['START REPEAT', None]
+5725-5765 i2c: ['BITS', [[0, 5760, 5765], [1, 5755, 5760], [1, 5750, 5755], [0, 5745, 5750], [0, 5740, 5745], [0, 5735, 5740], [1, 5730, 5735], [0, 5725, 5730]]]
+5725-5765 i2c: ['ADDRESS WRITE', 35]
+5765-5770 i2c: ['ACK', None]
+5772-5812 i2c: ['BITS', [[1, 5807, 5812], [0, 5802, 5807], [0, 5797, 5802], [0, 5792, 5797], [0, 5787, 5792], [1, 5782, 5787], [0, 5777, 5782], [0, 5772, 5777]]]
+5772-5812 i2c: ['DATA WRITE', 33]
+5812-5817 i2c: ['ACK', None]
+5822-5822 i2c: ['STOP', None]
+5887-5887 i2c: ['START', None]
+5895-5935 i2c: ['BITS', [[0, 5930, 5935], [1, 5925, 5930], [1, 5920, 5925], [0, 5915, 5920], [0, 5910, 5915], [0, 5905, 5910], [1, 5900, 5905], [0, 5895, 5900]]]
+5895-5935 i2c: ['ADDRESS WRITE', 35]
+5935-5940 i2c: ['ACK', None]
+5942-5982 i2c: ['BITS', [[1, 5977, 5982], [0, 5972, 5977], [0, 5967, 5972], [0, 5962, 5967], [0, 5957, 5962], [1, 5952, 5957], [0, 5947, 5952], [0, 5942, 5947]]]
+5942-5982 i2c: ['DATA WRITE', 33]
+5982-5987 i2c: ['ACK', None]
+5992-5992 i2c: ['STOP', None]
+469231-469231 i2c: ['START', None]
+469238-469278 i2c: ['BITS', [[1, 469273, 469278], [1, 469268, 469273], [1, 469263, 469268], [0, 469258, 469263], [0, 469253, 469258], [0, 469248, 469253], [1, 469243, 469248], [0, 469238, 469243]]]
+469238-469278 i2c: ['ADDRESS READ', 35]
+469278-469283 i2c: ['ACK', None]
+469285-469325 i2c: ['BITS', [[0, 469320, 469325], [0, 469315, 469320], [0, 469310, 469315], [0, 469305, 469310], [0, 469300, 469305], [0, 469295, 469300], [0, 469290, 469295], [0, 469285, 469290]]]
+469285-469325 i2c: ['DATA READ', 0]
+469325-469330 i2c: ['ACK', None]
+469333-469373 i2c: ['BITS', [[0, 469368, 469373], [1, 469363, 469368], [0, 469358, 469363], [0, 469353, 469358], [0, 469348, 469353], [1, 469343, 469348], [1, 469338, 469343], [1, 469333, 469338]]]
+469333-469373 i2c: ['DATA READ', 226]
+469373-469378 i2c: ['NACK', None]
+469383-469383 i2c: ['STOP', None]
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.bin_address_read b/decoder/test/i2c/bh1750_hresolutionmode.bin_address_read
new file mode 100644 (file)
index 0000000..39b4c39
--- /dev/null
@@ -0,0 +1 @@
+63807-63847 i2c: 23
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.bin_address_write b/decoder/test/i2c/bh1750_hresolutionmode.bin_address_write
new file mode 100644 (file)
index 0000000..665b44f
--- /dev/null
@@ -0,0 +1,5 @@
+1007-1047 i2c: 23
+1127-1167 i2c: 23
+1234-1274 i2c: 23
+1344-1384 i2c: 23
+1509-1549 i2c: 23
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.bin_data_read b/decoder/test/i2c/bh1750_hresolutionmode.bin_data_read
new file mode 100644 (file)
index 0000000..6c6b93f
--- /dev/null
@@ -0,0 +1,2 @@
+63854-63894 i2c: 00
+63902-63942 i2c: 29
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.bin_data_write b/decoder/test/i2c/bh1750_hresolutionmode.bin_data_write
new file mode 100644 (file)
index 0000000..e13ad5f
--- /dev/null
@@ -0,0 +1,5 @@
+1055-1095 i2c: 01
+1175-1215 i2c: 42
+1282-1322 i2c: 65
+1391-1431 i2c: 20
+1556-1596 i2c: 20
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.output b/decoder/test/i2c/bh1750_hresolutionmode.output
new file mode 100644 (file)
index 0000000..3548074
--- /dev/null
@@ -0,0 +1,146 @@
+1000-1000 i2c: start: "Start" "S"
+1042-1047 i2c: bit: "0"
+1037-1042 i2c: bit: "1"
+1032-1037 i2c: bit: "1"
+1027-1032 i2c: bit: "0"
+1022-1027 i2c: bit: "0"
+1017-1022 i2c: bit: "0"
+1012-1017 i2c: bit: "1"
+1007-1012 i2c: bit: "0"
+1042-1047 i2c: address-write: "Write" "Wr" "W"
+1007-1042 i2c: address-write: "Address write: 23" "AW: 23" "23"
+1047-1052 i2c: ack: "ACK" "A"
+1090-1095 i2c: bit: "1"
+1085-1090 i2c: bit: "0"
+1080-1085 i2c: bit: "0"
+1075-1080 i2c: bit: "0"
+1070-1075 i2c: bit: "0"
+1065-1070 i2c: bit: "0"
+1060-1065 i2c: bit: "0"
+1055-1060 i2c: bit: "0"
+1055-1095 i2c: data-write: "Data write: 01" "DW: 01" "01"
+1095-1100 i2c: ack: "ACK" "A"
+1105-1105 i2c: stop: "Stop" "P"
+1120-1120 i2c: start: "Start" "S"
+1162-1167 i2c: bit: "0"
+1157-1162 i2c: bit: "1"
+1152-1157 i2c: bit: "1"
+1147-1152 i2c: bit: "0"
+1142-1147 i2c: bit: "0"
+1137-1142 i2c: bit: "0"
+1132-1137 i2c: bit: "1"
+1127-1132 i2c: bit: "0"
+1162-1167 i2c: address-write: "Write" "Wr" "W"
+1127-1162 i2c: address-write: "Address write: 23" "AW: 23" "23"
+1167-1172 i2c: ack: "ACK" "A"
+1210-1215 i2c: bit: "0"
+1205-1210 i2c: bit: "1"
+1200-1205 i2c: bit: "0"
+1195-1200 i2c: bit: "0"
+1190-1195 i2c: bit: "0"
+1185-1190 i2c: bit: "0"
+1180-1185 i2c: bit: "1"
+1175-1180 i2c: bit: "0"
+1175-1215 i2c: data-write: "Data write: 42" "DW: 42" "42"
+1215-1220 i2c: ack: "ACK" "A"
+1225-1225 i2c: repeat-start: "Start repeat" "Sr"
+1269-1274 i2c: bit: "0"
+1264-1269 i2c: bit: "1"
+1259-1264 i2c: bit: "1"
+1254-1259 i2c: bit: "0"
+1249-1254 i2c: bit: "0"
+1244-1249 i2c: bit: "0"
+1239-1244 i2c: bit: "1"
+1234-1239 i2c: bit: "0"
+1269-1274 i2c: address-write: "Write" "Wr" "W"
+1234-1269 i2c: address-write: "Address write: 23" "AW: 23" "23"
+1274-1279 i2c: ack: "ACK" "A"
+1317-1322 i2c: bit: "1"
+1312-1317 i2c: bit: "0"
+1307-1312 i2c: bit: "1"
+1302-1307 i2c: bit: "0"
+1297-1302 i2c: bit: "0"
+1292-1297 i2c: bit: "1"
+1287-1292 i2c: bit: "1"
+1282-1287 i2c: bit: "0"
+1282-1322 i2c: data-write: "Data write: 65" "DW: 65" "65"
+1322-1327 i2c: ack: "ACK" "A"
+1332-1332 i2c: repeat-start: "Start repeat" "Sr"
+1379-1384 i2c: bit: "0"
+1374-1379 i2c: bit: "1"
+1369-1374 i2c: bit: "1"
+1364-1369 i2c: bit: "0"
+1359-1364 i2c: bit: "0"
+1354-1359 i2c: bit: "0"
+1349-1354 i2c: bit: "1"
+1344-1349 i2c: bit: "0"
+1379-1384 i2c: address-write: "Write" "Wr" "W"
+1344-1379 i2c: address-write: "Address write: 23" "AW: 23" "23"
+1384-1389 i2c: ack: "ACK" "A"
+1426-1431 i2c: bit: "0"
+1421-1426 i2c: bit: "0"
+1416-1421 i2c: bit: "0"
+1411-1416 i2c: bit: "0"
+1406-1411 i2c: bit: "0"
+1401-1406 i2c: bit: "1"
+1396-1401 i2c: bit: "0"
+1391-1396 i2c: bit: "0"
+1391-1431 i2c: data-write: "Data write: 20" "DW: 20" "20"
+1431-1436 i2c: ack: "ACK" "A"
+1441-1441 i2c: stop: "Stop" "P"
+1501-1501 i2c: start: "Start" "S"
+1544-1549 i2c: bit: "0"
+1539-1544 i2c: bit: "1"
+1534-1539 i2c: bit: "1"
+1529-1534 i2c: bit: "0"
+1524-1529 i2c: bit: "0"
+1519-1524 i2c: bit: "0"
+1514-1519 i2c: bit: "1"
+1509-1514 i2c: bit: "0"
+1544-1549 i2c: address-write: "Write" "Wr" "W"
+1509-1544 i2c: address-write: "Address write: 23" "AW: 23" "23"
+1549-1554 i2c: ack: "ACK" "A"
+1591-1596 i2c: bit: "0"
+1586-1591 i2c: bit: "0"
+1581-1586 i2c: bit: "0"
+1576-1581 i2c: bit: "0"
+1571-1576 i2c: bit: "0"
+1566-1571 i2c: bit: "1"
+1561-1566 i2c: bit: "0"
+1556-1561 i2c: bit: "0"
+1556-1596 i2c: data-write: "Data write: 20" "DW: 20" "20"
+1596-1601 i2c: ack: "ACK" "A"
+1606-1606 i2c: stop: "Stop" "P"
+63800-63800 i2c: start: "Start" "S"
+63842-63847 i2c: bit: "1"
+63837-63842 i2c: bit: "1"
+63832-63837 i2c: bit: "1"
+63827-63832 i2c: bit: "0"
+63822-63827 i2c: bit: "0"
+63817-63822 i2c: bit: "0"
+63812-63817 i2c: bit: "1"
+63807-63812 i2c: bit: "0"
+63842-63847 i2c: address-read: "Read" "Rd" "R"
+63807-63842 i2c: address-read: "Address read: 23" "AR: 23" "23"
+63847-63852 i2c: ack: "ACK" "A"
+63889-63894 i2c: bit: "0"
+63884-63889 i2c: bit: "0"
+63879-63884 i2c: bit: "0"
+63874-63879 i2c: bit: "0"
+63869-63874 i2c: bit: "0"
+63864-63869 i2c: bit: "0"
+63859-63864 i2c: bit: "0"
+63854-63859 i2c: bit: "0"
+63854-63894 i2c: data-read: "Data read: 00" "DR: 00" "00"
+63894-63899 i2c: ack: "ACK" "A"
+63937-63942 i2c: bit: "1"
+63932-63937 i2c: bit: "0"
+63927-63932 i2c: bit: "0"
+63922-63927 i2c: bit: "1"
+63917-63922 i2c: bit: "0"
+63912-63917 i2c: bit: "1"
+63907-63912 i2c: bit: "0"
+63902-63907 i2c: bit: "0"
+63902-63942 i2c: data-read: "Data read: 29" "DR: 29" "29"
+63942-63947 i2c: nack: "NACK" "N"
+63953-63953 i2c: stop: "Stop" "P"
diff --git a/decoder/test/i2c/bh1750_hresolutionmode.python b/decoder/test/i2c/bh1750_hresolutionmode.python
new file mode 100644 (file)
index 0000000..b775f77
--- /dev/null
@@ -0,0 +1,49 @@
+1000-1000 i2c: ['START', None]
+1007-1047 i2c: ['BITS', [[0, 1042, 1047], [1, 1037, 1042], [1, 1032, 1037], [0, 1027, 1032], [0, 1022, 1027], [0, 1017, 1022], [1, 1012, 1017], [0, 1007, 1012]]]
+1007-1047 i2c: ['ADDRESS WRITE', 35]
+1047-1052 i2c: ['ACK', None]
+1055-1095 i2c: ['BITS', [[1, 1090, 1095], [0, 1085, 1090], [0, 1080, 1085], [0, 1075, 1080], [0, 1070, 1075], [0, 1065, 1070], [0, 1060, 1065], [0, 1055, 1060]]]
+1055-1095 i2c: ['DATA WRITE', 1]
+1095-1100 i2c: ['ACK', None]
+1105-1105 i2c: ['STOP', None]
+1120-1120 i2c: ['START', None]
+1127-1167 i2c: ['BITS', [[0, 1162, 1167], [1, 1157, 1162], [1, 1152, 1157], [0, 1147, 1152], [0, 1142, 1147], [0, 1137, 1142], [1, 1132, 1137], [0, 1127, 1132]]]
+1127-1167 i2c: ['ADDRESS WRITE', 35]
+1167-1172 i2c: ['ACK', None]
+1175-1215 i2c: ['BITS', [[0, 1210, 1215], [1, 1205, 1210], [0, 1200, 1205], [0, 1195, 1200], [0, 1190, 1195], [0, 1185, 1190], [1, 1180, 1185], [0, 1175, 1180]]]
+1175-1215 i2c: ['DATA WRITE', 66]
+1215-1220 i2c: ['ACK', None]
+1225-1225 i2c: ['START REPEAT', None]
+1234-1274 i2c: ['BITS', [[0, 1269, 1274], [1, 1264, 1269], [1, 1259, 1264], [0, 1254, 1259], [0, 1249, 1254], [0, 1244, 1249], [1, 1239, 1244], [0, 1234, 1239]]]
+1234-1274 i2c: ['ADDRESS WRITE', 35]
+1274-1279 i2c: ['ACK', None]
+1282-1322 i2c: ['BITS', [[1, 1317, 1322], [0, 1312, 1317], [1, 1307, 1312], [0, 1302, 1307], [0, 1297, 1302], [1, 1292, 1297], [1, 1287, 1292], [0, 1282, 1287]]]
+1282-1322 i2c: ['DATA WRITE', 101]
+1322-1327 i2c: ['ACK', None]
+1332-1332 i2c: ['START REPEAT', None]
+1344-1384 i2c: ['BITS', [[0, 1379, 1384], [1, 1374, 1379], [1, 1369, 1374], [0, 1364, 1369], [0, 1359, 1364], [0, 1354, 1359], [1, 1349, 1354], [0, 1344, 1349]]]
+1344-1384 i2c: ['ADDRESS WRITE', 35]
+1384-1389 i2c: ['ACK', None]
+1391-1431 i2c: ['BITS', [[0, 1426, 1431], [0, 1421, 1426], [0, 1416, 1421], [0, 1411, 1416], [0, 1406, 1411], [1, 1401, 1406], [0, 1396, 1401], [0, 1391, 1396]]]
+1391-1431 i2c: ['DATA WRITE', 32]
+1431-1436 i2c: ['ACK', None]
+1441-1441 i2c: ['STOP', None]
+1501-1501 i2c: ['START', None]
+1509-1549 i2c: ['BITS', [[0, 1544, 1549], [1, 1539, 1544], [1, 1534, 1539], [0, 1529, 1534], [0, 1524, 1529], [0, 1519, 1524], [1, 1514, 1519], [0, 1509, 1514]]]
+1509-1549 i2c: ['ADDRESS WRITE', 35]
+1549-1554 i2c: ['ACK', None]
+1556-1596 i2c: ['BITS', [[0, 1591, 1596], [0, 1586, 1591], [0, 1581, 1586], [0, 1576, 1581], [0, 1571, 1576], [1, 1566, 1571], [0, 1561, 1566], [0, 1556, 1561]]]
+1556-1596 i2c: ['DATA WRITE', 32]
+1596-1601 i2c: ['ACK', None]
+1606-1606 i2c: ['STOP', None]
+63800-63800 i2c: ['START', None]
+63807-63847 i2c: ['BITS', [[1, 63842, 63847], [1, 63837, 63842], [1, 63832, 63837], [0, 63827, 63832], [0, 63822, 63827], [0, 63817, 63822], [1, 63812, 63817], [0, 63807, 63812]]]
+63807-63847 i2c: ['ADDRESS READ', 35]
+63847-63852 i2c: ['ACK', None]
+63854-63894 i2c: ['BITS', [[0, 63889, 63894], [0, 63884, 63889], [0, 63879, 63884], [0, 63874, 63879], [0, 63869, 63874], [0, 63864, 63869], [0, 63859, 63864], [0, 63854, 63859]]]
+63854-63894 i2c: ['DATA READ', 0]
+63894-63899 i2c: ['ACK', None]
+63902-63942 i2c: ['BITS', [[1, 63937, 63942], [0, 63932, 63937], [0, 63927, 63932], [1, 63922, 63927], [0, 63917, 63922], [1, 63912, 63917], [0, 63907, 63912], [0, 63902, 63907]]]
+63902-63942 i2c: ['DATA READ', 41]
+63942-63947 i2c: ['NACK', None]
+63953-63953 i2c: ['STOP', None]
index e4acf8305e98cc1e66ef82c68a376596f77e1e73..bf8249b36f562312d2f1a7287690cdbca0bb0338 100644 (file)
@@ -68,3 +68,23 @@ test sensirion_sht31_25rh_28rh
        output i2c binary class data-write match sensirion_sht31_25rh_28rh.bin_data_write
        output i2c binary class address-read match sensirion_sht31_25rh_28rh.bin_address_read
        output i2c binary class address-write match sensirion_sht31_25rh_28rh.bin_address_write
        output i2c binary class data-write match sensirion_sht31_25rh_28rh.bin_data_write
        output i2c binary class address-read match sensirion_sht31_25rh_28rh.bin_address_read
        output i2c binary class address-write match sensirion_sht31_25rh_28rh.bin_address_write
+
+test bh1750_hresolutionmode
+       protocol-decoder i2c channel scl=0 channel sda=1
+       input i2c/rohm_bh1750/bh1750_hresolutionmode.sr
+       output i2c annotation match bh1750_hresolutionmode.output
+       output i2c python match bh1750_hresolutionmode.python
+       output i2c binary class data-read match bh1750_hresolutionmode.bin_data_read
+       output i2c binary class data-write match bh1750_hresolutionmode.bin_data_write
+       output i2c binary class address-read match bh1750_hresolutionmode.bin_address_read
+       output i2c binary class address-write match bh1750_hresolutionmode.bin_address_write
+
+test bh1750_h2resolutionmode
+       protocol-decoder i2c channel scl=0 channel sda=1
+       input i2c/rohm_bh1750/bh1750_h2resolutionmode.sr
+       output i2c annotation match bh1750_h2resolutionmode.output
+       output i2c python match bh1750_h2resolutionmode.python
+       output i2c binary class data-read match bh1750_h2resolutionmode.bin_data_read
+       output i2c binary class data-write match bh1750_h2resolutionmode.bin_data_write
+       output i2c binary class address-read match bh1750_h2resolutionmode.bin_address_read
+       output i2c binary class address-write match bh1750_h2resolutionmode.bin_address_write