|
@@ -190,6 +190,15 @@ class LPC:
|
190
|
190
|
self._send_command("R {} {}\r\n".format(start, count).encode("utf-8"))
|
191
|
191
|
return self._uart.read(count)
|
192
|
192
|
|
|
193
|
+ def prepare_write(self, start, end=None):
|
|
194
|
+ """Prepare the the given flash sector(s) for write operations
|
|
195
|
+
|
|
196
|
+ If end is not specified, only the start sector is prepared.
|
|
197
|
+ """
|
|
198
|
+ if end is None:
|
|
199
|
+ end = start
|
|
200
|
+ self._send_command("P {} {}\r\n".format(start, end).encode("utf-8"))
|
|
201
|
+
|
193
|
202
|
|
194
|
203
|
class ReturnCode(Enum):
|
195
|
204
|
"""LPC ISP return codes
|