def __init__(self, interface): self._logger = logging.getLogger("BBi2c") self._interface = interface self._bus_num = interface['bus_num'] # Older kernels utilizing the omap mux starts counting from 1 if bbmux_controller.use_omapmux(): self._bus_num += 1
def __init__(self): gpio_interface.GpioInterface.__init__(self) self._logger.debug('') self._exported_gpios = [] self._bbmux_controller = None if bbmux_controller.use_omapmux(): self._bbmux_controller = bbmux_controller.BBmuxController() # Ensure we release the system resources at exit time. atexit.register(self.close)
def __init__(self, interface): super(BBuart, self).__init__() self._interface = interface self._uart_num = interface['uart_num'] self._pty = TTY_MAP[self._uart_num] if bbmux_controller.use_omapmux(): self._bbmux_controller = bbmux_controller.BBmuxController() self.open() self._logger = logging.getLogger('bbuart') self._logger.debug('Initialized BBuart for interface %s with tty:%s', interface, self._pty) # Beaglebone defaults to a baudrate of 9600, set it to what servo expects. self.set_uart_props(DEFAULT_UART_SETTINGS)