changed colors

This commit is contained in:
2025-01-26 20:44:46 +01:00
parent e73fd72b09
commit 3133e04684

View File

@@ -79,9 +79,9 @@ class Decoder(srd.Decoder):
'default': 'little', 'values': ('little', 'big'), 'idn':'dec_i80_opt_endianess'},
)
annotations = (
('command', 'Command'),
('read_data', 'Read'),
('write_data', 'Write'),
('read_data', 'Read'),
('command', 'Command'),
('reset', 'Reset'),
('warnings', 'Warnings'),
)
@@ -180,13 +180,13 @@ class Decoder(srd.Decoder):
# check edge on hwe
if have_hwe and ((not self._last_operation[2] and operation[2] and hwe_active_low) or (self._last_operation[2] and not operation[2] and not hwe_active_low)):
self._data = data
self._data_is_cmd = operation[1] if cmd_active_low else not operation[1]
self._data_is_cmd = not operation[1] if cmd_active_low else operation[1]
self._data_dir = 1
# check edge on hre
elif have_hre and ((not self._last_operation[3] and operation[3] and hre_active_low) or (self._last_operation[3] and not operation[3] and not hre_active_low)):
self._data = data
self._data_is_cmd = operation[1] if cmd_active_low else not operation[1]
self._data_is_cmd = not operation[1] if cmd_active_low else operation[1]
self._data_dir = 0
# check cs switch
@@ -197,9 +197,9 @@ class Decoder(srd.Decoder):
#cs off
elif self._data_is_cmd:
self.putd(self._data_begin, self.samplenum, [0, [self.format.format(self._data)]])
self.putd(self._data_begin, self.samplenum, [2, [self.format.format(self._data)]])
else:
self.putd(self._data_begin, self.samplenum, [2 if self._data_dir else 1, [self.format.format(self._data)]])
self.putd(self._data_begin, self.samplenum, [0 if self._data_dir else 1, [self.format.format(self._data)]])
# check rst switch
if operation[4] != self._last_operation[4]: