m2i / AccessControlBox

The code for the access control boxes.
0 stars 0 forks source link

Non-blocking read for keyboard events #3

Closed ghost closed 6 years ago

ghost commented 6 years ago

The read() call will block until data is ready, we need to use select() to go to non-blocking so that we can disable access if the card is removed.

ghost commented 6 years ago

Done. There are parameters for the timeout and a retry count. The current total card timeout (application level) is ~5 seconds, with 10 retries in that time.