From 3133e04684beff4ee5cae176db9d94fca6385d54 Mon Sep 17 00:00:00 2001 From: timoschneider Date: Sun, 26 Jan 2025 20:44:46 +0100 Subject: [PATCH] changed colors --- i80/pd.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/i80/pd.py b/i80/pd.py index 9043444..3759de1 100644 --- a/i80/pd.py +++ b/i80/pd.py @@ -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]: