Strooom / PN7150

Library/Driver for NXP PN7150 NFC device
Other
24 stars 25 forks source link

Improve timeOut handling #3

Closed Strooom closed 4 years ago

Strooom commented 4 years ago

currently, in the NCI stateMachine, the first check is for timeOut and then we check for having received a message. If for some reason the DH runs the NCI stateMachine after the timeOut (eg due to being blocked somewhere else in code) but the NFC device answered in time, the timeOut will still trigger. By checking for having received a msg first, and only when nothing received checking for timeOut, the behaviour will be more robust.