Skip to content

Commit 43e025d

Browse files
Merge pull request #13 from hstarmans/slowfix
fix extremely slow interaction issue #11
2 parents f2641b5 + 0a3ed55 commit 43e025d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
### Removed
1313
### Fixed
1414
-->
15+
## [0.5.4] - 2024-05-30
16+
### Fixed
17+
- sleep changed to microsecond sleep to speed up flashing
1518
## [0.5.3] - 2024-05-30
1619
### Fixed
1720
- fixed string formatting for compatibility with micropython

winbond/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
22
# -*- coding: UTF-8 -*-
33

4-
__version_info__ = ("0", "5", "3")
4+
__version_info__ = ("0", "5", "4")
55
__version__ = ".".join(__version_info__)

winbond/winbond.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ def _await(self) -> None:
233233
# last bit (1) is BUSY bit in stat. reg. byte (0 = not busy, 1 = busy)
234234
trials = 0
235235
while 0x1 & self.spi.read(1, 0xFF)[0]:
236-
if trials > 20:
236+
if trials > 5E6:
237237
raise Exception("Device keeps busy, aborting.")
238-
time.sleep(0.1)
238+
time.sleep_us(1)
239239
trials += 1
240240
self.cs(1)
241241
self._busy = False

0 commit comments

Comments
 (0)