def __init__(self, port, baudrate): UwfProcessor.__init__(self, port, baudrate) # Expected registration values for an RM1XX self.expected_handle = 0 self.expected_num_banks = 1 self.expected_bank_algo = 1
def __init__(self, port, baudrate): UwfProcessor.__init__(self, port, baudrate) # Setup the DBus connection to the device service self.bus = dbus.SystemBus() self.device_svc = dbus.Interface( self.bus.get_object('com.lairdtech.device.DeviceService', '/com/lairdtech/device/DeviceService'), 'com.lairdtech.device.public.DeviceInterface') # Expected registration values for an IG60 BL654 self.expected_handle = 0 self.expected_num_banks = 1 self.expected_bank_algo = 1
def process_command_register_device(self, file, data_length): error = None UwfProcessor.process_command_register_device(self, file, data_length) # Validate the registration data if self.handle == self.expected_handle and self.num_banks == self.expected_num_banks and self.bank_size > 0 and self.bank_algo == self.expected_bank_algo: self.registered = True else: error = ERROR_REGISTER_DEVICE.format( 'Unexpected registration data') self.registered = False return error
def enter_bootloader(self): self.reset_via_uartbreak(post_delay=2.0) return UwfProcessor.enter_bootloader(self)
def enter_bootloader(self): self.reset_via_uartbreak() return UwfProcessor.enter_bootloader(self)