WMT-GmbH / pn532

no_std implementation of the Pn532 protocol using embedded_hal traits
Apache License 2.0
20 stars 19 forks source link

tell the excecutor to poll until `wait_ready` returns `Ready` #12

Closed dimpolo closed 1 year ago

dimpolo commented 1 year ago

fixes #11

@averyanalex could you check if this works for you?

averyanalex commented 1 year ago

Hello, yes, it works, and process_async doesn't blocks, other async tasks are running when waiting for response! But yes, timers will be good, because now cpu can't sleep when waiting for response.

dimpolo commented 1 year ago

Thanks for your help!

averyanalex commented 1 year ago

Thanks for your help!

I thinked a bit about timers... maybe pass async fn to async pn532 constructor? And run this user-provided function after every ready check?