Empty input buffer before writing to bus

There is a problem with additional bytes in read buffer when using this library with beaglebone cape.