New pycoax API

This commit is contained in:
Andrew Kay
2021-10-16 12:19:13 -05:00
parent f78af20a20
commit 9dfab54950
29 changed files with 1573 additions and 659 deletions

View File

@@ -2,16 +2,16 @@
from common import open_example_serial_interface
from coax import poll, poll_ack
from coax import Poll, PollAck
with open_example_serial_interface(poll_flush=False) as interface:
print('POLL...')
poll_response = poll(interface, receive_timeout=5)
poll_response = interface.execute(Poll(), timeout=5)
print(poll_response)
if poll_response:
print('POLL_ACK...')
poll_ack(interface)
interface.execute(PollAck())