Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stm32/common/dma_common_f24.c')
-rw-r--r--lib/stm32/common/dma_common_f24.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/stm32/common/dma_common_f24.c b/lib/stm32/common/dma_common_f24.c
index 6b655636..d706674f 100644
--- a/lib/stm32/common/dma_common_f24.c
+++ b/lib/stm32/common/dma_common_f24.c
@@ -775,6 +775,20 @@ void dma_set_memory_address_1(uint32_t dma, uint8_t stream, uint32_t address)
}
/*---------------------------------------------------------------------------*/
+/** @brief DMA Stream Get the Transfer Block Size
+
+@param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2
+@param[in] stream unsigned int8. Stream number: @ref dma_st_number
+@returns unsigned int16. Number of remaining data words to transfer (65535
+maximum).
+*/
+
+uint16_t dma_get_number_of_data(uint32_t dma, uint8_t stream)
+{
+ return DMA_SNDTR(dma, stream);
+}
+
+/*---------------------------------------------------------------------------*/
/** @brief DMA Stream Set the Transfer Block Size
@note The DMA stream must be disabled before setting this count value. The count