I'm using the FIFOed Avalon Uart in a project and I'd like to modify the driver so that it blocks, but has a timeout. Basically I don't want to risk hanging if I miss a byte while in blocking mode. I've also seen cases where I miss replies if I don't block because the call to the fread function happens before the data is sent from the device. I figure with a time-out I get the reply as fast as possible, but I don't hang if the reply never comes (or is short a byte).
I think I see a way to modify the driver, but I thought I would post the question in case the author still checks these forums and might have some advice. Any "gotchas" I might not realize. Or any advice from driver experts.
Thanks!