Skip to content

Commit

Permalink
use int division
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed May 6, 2024
1 parent 1b12ff5 commit 2493023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_avrprog.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def _flash_page(
self, page_buffer: bytearray, page_addr: int, page_size: int
) -> None:
page_addr //= 2 # address is by 'words' not bytes!
for i in range(page_size / 2): # page indexed by words, not bytes
for i in range(page_size // 2): # page indexed by words, not bytes
lo_byte, hi_byte = page_buffer[2 * i : 2 * i + 2]
self._flash_word(i, lo_byte, hi_byte)

Expand Down

0 comments on commit 2493023

Please sign in to comment.