Flush the transfer before exiting from write function.
authorbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 9 Jul 2010 10:43:19 +0000 (10:43 +0000)
committerbatt <batt@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 9 Jul 2010 10:43:19 +0000 (10:43 +0000)
commitb44c11e480505f754d0f7b4ac3067e4ebf5adcc2
tree2107e5575fb4c738ae28d8d1e1b0c8c304584a0f
parentc01a3023279e0039e995017b9bb5af0a92225734
Flush the transfer before exiting from write function.

Since the buffer is used by the DMA, if we return early we run the
risk of having the buffer overwritten before the transfer will be
completed.
Waiting for the flush could be theorically a pessimization, but from
tests, since the typical use involves mixed reads/writes, we already
wait for the transfers to be completed, and performance are
almost the same.

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4017 38d2e660-2303-0410-9eaa-f027e97ec537
bertos/cpu/arm/drv/spi_dma_at91.c