forked from M-Labs/artiq
spi: register clk
This commit is contained in:
parent
e6306b712d
commit
66d1647efd
|
@ -208,9 +208,11 @@ class SPIMaster(Module):
|
||||||
|
|
||||||
clk_t = TSTriple()
|
clk_t = TSTriple()
|
||||||
self.specials += clk_t.get_tristate(pads.clk)
|
self.specials += clk_t.get_tristate(pads.clk)
|
||||||
self.comb += [
|
self.comb += clk_t.oe.eq(~config.offline),
|
||||||
clk_t.oe.eq(~config.offline),
|
self.sync += [
|
||||||
clk_t.o.eq((spi.cg.clk & spi.cs) ^ config.clk_polarity),
|
If(spi.cg.ce & spi.cg.edge,
|
||||||
|
clk_t.o.eq((~spi.cg.clk & spi.cs_next) ^ config.clk_polarity)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
mosi_t = TSTriple()
|
mosi_t = TSTriple()
|
||||||
|
|
Loading…
Reference in New Issue