Mercurial > lcfOS
diff python/st-util.py @ 247:dd8bbb963458
project remove
author | Windel Bouwman |
---|---|
date | Fri, 26 Jul 2013 10:44:26 +0200 |
parents | 6259856841a0 |
children | 2ccd57b1d78c |
line wrap: on
line diff
--- a/python/st-util.py Thu Jul 25 08:11:30 2013 +0200 +++ b/python/st-util.py Fri Jul 26 10:44:26 2013 +0200 @@ -68,6 +68,7 @@ toIndex = self.index(21, 1) self.dataChanged.emit(fromIndex, toIndex) + class RegisterView(QTableView): def __init__(self): super().__init__() @@ -128,8 +129,10 @@ self.device = dev self.Address = 0x8000000 + class DebugToolbar(QToolBar): statusChange = pyqtSignal() + codePosition = pyqtSignal(int) def __init__(self): super().__init__() self.device = None @@ -153,6 +156,10 @@ self.stepAction.setEnabled(not self.device.Running) self.stopAction.setEnabled(self.device.Running) self.statusChange.emit() + if not self.device.Running: + PC = 15 + v = self.device.iface.read_reg(PC) + self.codePosition.emit(v) else: self.resetAction.setEnabled(False) self.enableTraceAction.setEnabled(False) @@ -178,16 +185,18 @@ self.device = dev self.updateEnables() + class FlashTool(QWidget): def __init__(self): super().__init__() # TODO! + class DeviceTreeModel(QAbstractItemModel): def __init__(self): super().__init__() - self.chipPixmap = QPixmap('chip.png').scaled(32, 32) - self.hardwarePixmap = QPixmap('hardware.png').scaled(32, 32) + self.chipPixmap = QPixmap('icons/chip.png').scaled(32, 32) + self.hardwarePixmap = QPixmap('icons/hardware.png').scaled(32, 32) self.refresh() def refresh(self): """ Check all usb interfaces for interfaces """