kopia lustrzana https://github.com/micropython/micropython-lib
lora-sync: Fix race with fast or failed send().
If send completes before the first call to poll_send(), the driver could get stuck in _sync_wait(). This had much less impact before rp2 port went tickless, as _sync_wait(will_irq=True) calls machine.idle() which may not wake very frequently on a tickless port. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>pull/804/head
rodzic
b712103519
commit
ad6ab5a78c
|
@ -42,8 +42,8 @@ class SyncModem:
|
||||||
|
|
||||||
tx = True
|
tx = True
|
||||||
while tx is True:
|
while tx is True:
|
||||||
tx = self.poll_send()
|
|
||||||
self._sync_wait(will_irq)
|
self._sync_wait(will_irq)
|
||||||
|
tx = self.poll_send()
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
def recv(self, timeout_ms=None, rx_length=0xFF, rx_packet=None):
|
def recv(self, timeout_ms=None, rx_length=0xFF, rx_packet=None):
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
metadata(version="0.1.0")
|
metadata(version="0.1.1")
|
||||||
require("lora")
|
require("lora")
|
||||||
package("lora")
|
package("lora")
|
||||||
|
|
Ładowanie…
Reference in New Issue