targets/ulx3s/add_oled: simplify.

This commit is contained in:
Florent Kermarrec 2020-08-04 12:31:15 +02:00
parent 623faa9d24
commit ee28d7b5ec
1 changed files with 3 additions and 7 deletions

View File

@ -114,17 +114,13 @@ class BaseSoC(SoCCore):
def add_oled(self): def add_oled(self):
pads = self.platform.request("oled_spi") pads = self.platform.request("oled_spi")
pads.miso = Signal() pads.miso = Signal()
oled = SPIMaster(pads, 8, self.sys_clk_freq, 8e6) self.submodules.oled_spi = SPIMaster(pads, 8, self.sys_clk_freq, 8e6)
oled.add_clk_divider() self.oled_spi.add_clk_divider()
self.submodules.oled_spi = oled
self.add_csr("oled_spi") self.add_csr("oled_spi")
ctl_pads = self.platform.request("oled_ctl") self.submodules.oled_ctl = GPIOOut(self.platform.request("oled_ctl"))
oled_ctl = GPIOOut(ctl_pads)
self.submodules.oled_ctl = oled_ctl
self.add_csr("oled_ctl") self.add_csr("oled_ctl")
# Build -------------------------------------------------------------------------------------------- # Build --------------------------------------------------------------------------------------------
def main(): def main():