From c388d0837ceb5f4602a0b05e072129c0c11470d6 Mon Sep 17 00:00:00 2001 From: Jochen Hoenicke Date: Thu, 26 May 2016 20:46:40 +0200 Subject: [PATCH] New debug messages --- trezorlib/debuglink.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trezorlib/debuglink.py b/trezorlib/debuglink.py index f3120ce..1f366e9 100644 --- a/trezorlib/debuglink.py +++ b/trezorlib/debuglink.py @@ -97,3 +97,13 @@ class DebugLink(object): def stop(self): self._call(proto.DebugLinkStop(), nowait=True) + + def memory_read(self, address, length): + obj = self._call(proto.DebugLinkMemoryRead(address=address, length=length)) + return obj.memory + + def memory_write(self, address, memory, flash=False): + self._call(proto.DebugLinkMemoryWrite(address=address, memory=memory, flash=flash), nowait=True) + + def flash_erase(self, sector): + obj = self._call(proto.DebugLinkFlashErase(sector=sector), nowait=True)