Skip to content

Commit

Permalink
Corrigindo acesso a segunda memoria
Browse files Browse the repository at this point in the history
  • Loading branch information
JN513 committed Nov 27, 2024
1 parent 2b33aab commit bd7e6e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def print_data(self, data: int) -> None:
Args:
data (int): Data to be printed.
"""
data = data.to_bytes(4, 'big')

for byte in data:
print(f'{byte:02x}', end='')
print()
Expand Down Expand Up @@ -162,7 +160,8 @@ def read_memory(self, address: int, second_memory: bool = False) -> int:
"""
address = address >> 2
if second_memory:
address = address | 0x80000000
address = address & 0xFFFFFF
address = address | 0x800000
self._send_command(0x4C, address)
data = self.read_data()
return int.from_bytes(data, 'big')
Expand Down

0 comments on commit bd7e6e4

Please sign in to comment.