Enumerated error codes. Switched from read() to select() when waiting for the in…
…terrupt (read() could have blocked permanently). Added a check to make sure that the reset of the DMA controller has completed. Added a check on the status of the DMA controller after completion.