From: Vesa-Pekka Palmu Date: Wed, 17 Oct 2018 22:56:26 +0000 (+0300) Subject: spiflash: Bugfix: WRSR was using miso for register decode X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2e3e0840d6cc8ad16b9964dcf5615371591e7f9f;p=libsigrokdecode.git spiflash: Bugfix: WRSR was using miso for register decode --- diff --git a/decoders/spiflash/pd.py b/decoders/spiflash/pd.py index 304545f..3d525b9 100644 --- a/decoders/spiflash/pd.py +++ b/decoders/spiflash/pd.py @@ -246,12 +246,12 @@ class Decoder(srd.Decoder): self.emit_cmd_byte() elif self.cmdstate == 2: # Byte 2: Master sends status register 1. - self.putx([Ann.BIT, [decode_status_reg(miso)]]) + self.putx([Ann.BIT, [decode_status_reg(mosi)]]) self.putx([Ann.FIELD, ['Status register 1']]) elif self.cmdstate == 3: # Byte 3: Master sends status register 2. # TODO: Decode status register 2 correctly. - self.putx([Ann.BIT, [decode_status_reg(miso)]]) + self.putx([Ann.BIT, [decode_status_reg(mosi)]]) self.putx([Ann.FIELD, ['Status register 2']]) self.es_cmd = self.es self.putc([Ann.WRSR, self.cmd_ann_list()])