m1n1.fw.smc: Add read32f()

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2023-04-18 22:09:07 +09:00
parent 7f9eaecbad
commit a1be8f233c

View file

@ -153,6 +153,9 @@ class SMCEndpoint(ASCBaseEndpoint):
def read32b(self, key): def read32b(self, key):
return struct.unpack(">I", self.read(key, 4))[0] return struct.unpack(">I", self.read(key, 4))[0]
def read32f(self, key):
return struct.unpack("<f", self.read(key, 4))[0]
def write64(self, key, data): def write64(self, key, data):
self.write(key, struct.pack("<Q", data)) self.write(key, struct.pack("<Q", data))