aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authoredolomb <none@example.com>2018-02-21 20:56:14 +0000
committeredolomb <none@example.com>2018-02-21 20:56:14 +0000
commitb75eda3185ddd11f31bc38f7c7aa493638d376b1 (patch)
tree1c9f54a8492bc4a3f242e97481d51709f38e351d /os/hal
parent43185af232c8689fb2082b14625fa5abc894eb92 (diff)
downloadChibiOS-b75eda3185ddd11f31bc38f7c7aa493638d376b1.tar.gz
ChibiOS-b75eda3185ddd11f31bc38f7c7aa493638d376b1.tar.bz2
ChibiOS-b75eda3185ddd11f31bc38f7c7aa493638d376b1.zip
Added getChannelTransitionSize function
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11532 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h
index 84f75f855..1f0921903 100644
--- a/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h
+++ b/os/hal/ports/SAMA/LLD/DMAv1/sama_xdmac.h
@@ -144,6 +144,20 @@ typedef struct {
(dmachp)->xdmac->XDMAC_CHID[(dmachp)->chid].XDMAC_CIS
/**
+ * @brief Returns the number of transfers to be performed.
+ * @note This function can be invoked in both ISR or thread context.
+ * @pre The stream must have been allocated using @p dmaChannelAllocate().
+ * @post After use the stream can be released using @p dmaChannelRelease().
+ *
+ * @param[in] dmachp pointer to a @p sama_dma_channel_t structure
+ * @return The number of transfers to be performed.
+ *
+ * @special
+ */
+#define dmaChannelGetTransactionSize(dmachp) \
+ ((size_t)((dmachp)->xdmac->XDMAC_CHID[(dmachp)->chid].XDMAC_CUBC))
+
+/**
* @brief Associates a source to a DMA channel.
* @note This function can be invoked in both ISR or thread context.
* @pre The channel must have been allocated using @p dmaChannelAllocate().