From 0e9aa76066b3201f6038894f88cd0363289ed587 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 12 Jun 2020 13:38:12 -0400 Subject: [PATCH] uc1701: Update bus import to "from .. import bus" Signed-off-by: Kevin O'Connor --- klippy/extras/display/uc1701.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/klippy/extras/display/uc1701.py b/klippy/extras/display/uc1701.py index b3157607..bcca8a5e 100644 --- a/klippy/extras/display/uc1701.py +++ b/klippy/extras/display/uc1701.py @@ -5,7 +5,7 @@ # # This file may be distributed under the terms of the GNU GPLv3 license. import logging -import extras.bus +from .. import bus from . import font8x14 BACKGROUND_PRIORITY_CLOCK = 0x7fffffff00000000 @@ -113,11 +113,10 @@ class DisplayBase: # IO wrapper for "4 wire" spi bus (spi bus with an extra data/control line) class SPI4wire: def __init__(self, config, data_pin_name): - self.spi = extras.bus.MCU_SPI_from_config(config, 0, - default_speed=10000000) + self.spi = bus.MCU_SPI_from_config(config, 0, default_speed=10000000) dc_pin = config.get(data_pin_name) - self.mcu_dc = extras.bus.MCU_bus_digital_out( - self.spi.get_mcu(), dc_pin, self.spi.get_command_queue()) + self.mcu_dc = bus.MCU_bus_digital_out(self.spi.get_mcu(), dc_pin, + self.spi.get_command_queue()) def send(self, cmds, is_data=False): self.mcu_dc.update_digital_out(is_data, reqclock=BACKGROUND_PRIORITY_CLOCK) @@ -126,8 +125,8 @@ class SPI4wire: # IO wrapper for i2c bus class I2C: def __init__(self, config, default_addr): - self.i2c = extras.bus.MCU_I2C_from_config( - config, default_addr=default_addr, default_speed=400000) + self.i2c = bus.MCU_I2C_from_config(config, default_addr=default_addr, + default_speed=400000) def send(self, cmds, is_data=False): if is_data: hdr = 0x40 @@ -143,8 +142,8 @@ class ResetHelper: self.mcu_reset = None if pin_desc is None: return - self.mcu_reset = extras.bus.MCU_bus_digital_out( - io_bus.get_mcu(), pin_desc, io_bus.get_command_queue()) + self.mcu_reset = bus.MCU_bus_digital_out(io_bus.get_mcu(), pin_desc, + io_bus.get_command_queue()) def init(self): if self.mcu_reset is None: return