Mercurial > lcfOS
diff python/stlink.py @ 132:205578c96a79
Moved hexview to seperate class
author | Windel Bouwman |
---|---|
date | Sun, 20 Jan 2013 17:45:45 +0100 |
parents | 654093a9a1e3 |
children | 14e739ed03ab |
line wrap: on
line diff
--- a/python/stlink.py Sat Jan 19 18:41:49 2013 +0100 +++ b/python/stlink.py Sun Jan 20 17:45:45 2013 +0100 @@ -80,7 +80,7 @@ self.exitDfuMode() if self.CurrentMode != DEBUG_MODE: self.enterSwdMode() - self.reset() + #self.reset() def close(self): if self.IsOpen: self.devHandle.close() @@ -151,6 +151,7 @@ statii = {CORE_RUNNING: 'CORE RUNNING', CORE_HALTED: 'CORE HALTED'} if s in statii: return statii[s] + return 'Unknown status' def reset(self): cmd = bytearray(16) @@ -224,6 +225,7 @@ # Test program sl = STLink2() sl.open() + sl.reset() print('version:', sl.Version) print('mode before doing anything:', sl.CurrentModeString) if sl.CurrentMode == DFU_MODE: