Homework for Monday 11/6

Write a reentrant device driver for the sonar in Psuedo-Code. You can assume that the caller always reads enough bytes to empty the buffer. If no measurement is ongoing, then you should perform a new measurement and return the result, otherwise you should return the result of the current ongoing measurement once it is completed.

To complete this assignment, define the "open" and "read" functions.