summaryrefslogtreecommitdiff
path: root/decoders/spi/pd.py
diff options
context:
space:
mode:
Diffstat (limited to 'decoders/spi/pd.py')
-rw-r--r--decoders/spi/pd.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/decoders/spi/pd.py b/decoders/spi/pd.py
index 2797137..7cfa266 100644
--- a/decoders/spi/pd.py
+++ b/decoders/spi/pd.py
@@ -108,12 +108,16 @@ class Decoder(srd.Decoder):
('miso-bits', 'MISO bits'),
('mosi-bits', 'MOSI bits'),
('warnings', 'Human-readable warnings'),
+ ('miso-transfer', 'MISO transfer'),
+ ('mosi-transfer', 'MOSI transfer'),
)
annotation_rows = (
('miso-data', 'MISO data', (0,)),
('miso-bits', 'MISO bits', (2,)),
+ ('miso-transfer', 'MISO transfer', (5,)),
('mosi-data', 'MOSI data', (1,)),
('mosi-bits', 'MOSI bits', (3,)),
+ ('mosi-transfer', 'MOSI transfer', (6,)),
('other', 'Other', (4,)),
)
binary = (
@@ -276,6 +280,12 @@ class Decoder(srd.Decoder):
self.misobytes = []
self.mosibytes = []
else:
+ if self.have_miso:
+ self.put(self.ss_transfer, self.samplenum, self.out_ann,
+ [5, [' '.join(format(x.val, '02X') for x in self.misobytes)]])
+ if self.have_mosi:
+ self.put(self.ss_transfer, self.samplenum, self.out_ann,
+ [6, [' '.join(format(x.val, '02X') for x in self.mosibytes)]])
self.put(self.ss_transfer, self.samplenum, self.out_python,
['TRANSFER', self.mosibytes, self.misobytes])