changed colors
This commit is contained in:
12
i80/pd.py
12
i80/pd.py
@@ -79,9 +79,9 @@ class Decoder(srd.Decoder):
|
|||||||
'default': 'little', 'values': ('little', 'big'), 'idn':'dec_i80_opt_endianess'},
|
'default': 'little', 'values': ('little', 'big'), 'idn':'dec_i80_opt_endianess'},
|
||||||
)
|
)
|
||||||
annotations = (
|
annotations = (
|
||||||
('command', 'Command'),
|
|
||||||
('read_data', 'Read'),
|
|
||||||
('write_data', 'Write'),
|
('write_data', 'Write'),
|
||||||
|
('read_data', 'Read'),
|
||||||
|
('command', 'Command'),
|
||||||
('reset', 'Reset'),
|
('reset', 'Reset'),
|
||||||
('warnings', 'Warnings'),
|
('warnings', 'Warnings'),
|
||||||
)
|
)
|
||||||
@@ -180,13 +180,13 @@ class Decoder(srd.Decoder):
|
|||||||
# check edge on hwe
|
# 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)):
|
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 = 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
|
self._data_dir = 1
|
||||||
|
|
||||||
# check edge on hre
|
# 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)):
|
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 = 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
|
self._data_dir = 0
|
||||||
|
|
||||||
# check cs switch
|
# check cs switch
|
||||||
@@ -197,9 +197,9 @@ class Decoder(srd.Decoder):
|
|||||||
|
|
||||||
#cs off
|
#cs off
|
||||||
elif self._data_is_cmd:
|
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:
|
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
|
# check rst switch
|
||||||
if operation[4] != self._last_operation[4]:
|
if operation[4] != self._last_operation[4]:
|
||||||
|
|||||||
Reference in New Issue
Block a user