Mercurial > lcfOS
comparison python/stm32.py @ 129:9e350a7dde98
Changed architecture and updated the util
author | Windel Bouwman |
---|---|
date | Fri, 18 Jan 2013 12:52:11 +0100 |
parents | 51cc127648e4 |
children | 654093a9a1e3 |
comparison
equal
deleted
inserted
replaced
128:51cc127648e4 | 129:9e350a7dde98 |
---|---|
53 return sectors | 53 return sectors |
54 | 54 |
55 @registerDevice(0x10016413) | 55 @registerDevice(0x10016413) |
56 class Stm32F4(Device): | 56 class Stm32F4(Device): |
57 def __init__(self, iface): | 57 def __init__(self, iface): |
58 super().__init__() | 58 super().__init__(iface) |
59 assert isinstance(iface, Interface) | 59 def __str__(self): |
60 self.iface = iface | 60 return 'STM32F4 device' |
61 # flashing commands: | 61 # flashing commands: |
62 def writeFlash(self, address, content): | 62 def writeFlash(self, address, content): |
63 # TODO: | 63 # TODO: |
64 flashsize = 0x100000 # fixed 1 MB for now.. | 64 flashsize = 0x100000 # fixed 1 MB for now.. |
65 print('WARNING: using 1 MB as flash size') | 65 print('WARNING: using 1 MB as flash size') |