Some applications using DMA, such as UART RX, could
need to complete the current DMA transaction earlier than
predefined, based on other termination conditions,
like UART's IDLE interrupts.
In that case, the client needs to know how many data are
still left in DMA transfer buffer so that it can figure
out how many data has been transfered. However, the current
DMA API doesn't provide any information for the client
to learn the transfer buffer information.
And some other information, like whether DMA transfer is busy
or not, transfer direction, etc, could interest a client.
So, added a dma API function to retrieve the current DMA
runtime status.
And implemented the API for STM32F4's DMA while keeping
others unimplemented.
Signed-off-by: Jun Li <jun.r.li@intel.com>