fix: the export data of annotation have't sort by time, about 1-spi protocol

This commit is contained in:
dreamsourcelabTAI 2022-07-28 17:10:55 +08:00
parent 02c9bff1ff
commit 1d249ff8ac

View File

@ -189,10 +189,14 @@ class Decoder(srd.Decoder):
# Bit annotations.
if self.have_miso:
for bit in self.misobits:
blen = len(self.misobits)
for i in range(0, blen):
bit = self.misobits[blen-i-1]
self.put(bit[1], bit[2], self.out_ann, [2, ['%d' % bit[0]]])
if self.have_mosi:
for bit in self.mosibits:
blen = len(self.mosibits)
for i in range(0, blen):
bit = self.mosibits[blen-i-1]
self.put(bit[1], bit[2], self.out_ann, [3, ['%d' % bit[0]]])
# Dataword annotations.