Skip to content

Commit

Permalink
spi: fix presence of WP & HOLD not checked
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryMakes committed Feb 25, 2020
1 parent fc4fac1 commit 5fd478d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nmigen_stdio/spiflash.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ def _add_spi_hardware_logic(self, platform, module):
counter_en = self.counter_en

if self._pins is not None:
module.d.comb += [
self._pins.cs.o.eq(self.cs),
self._pins.wp.eq(0),
self._pins.hold.eq(0)
]
module.d.comb += self._pins.cs.o.eq(self.cs)
if hasattr(self._pins, "wp"):
module.d.comb += self._pins.wp.eq(0)
if hasattr(self._pins, "hold"):
module.d.comb += self._pins.hold.eq(0)
# Platforms that require declaration of a user SPI clock signal
# (e.g. by instantiating a USRMCLK Instance) must NOT pass a CLK on the SPI flash
if hasattr(self._pins, "clk"):
Expand Down

0 comments on commit 5fd478d

Please sign in to comment.