Change the waitloop logic in peripheral odma write(). Fixes #21.

- Peripheral odma could enter a dead state if a block larger than the
  ODMA buffer size was written. Thanks to @denravonska for reporting this.
Merge pull request #1 from aery32/master

Merging updates