From 88dd95e70fc6259c46a9940b64238b689191df2a Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Wed, 16 Mar 2022 16:17:09 +0000 Subject: [PATCH] Removed check for old device revision. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15525 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/hal/ports/STM32/LLD/BDMAv1/stm32_bdma.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/os/hal/ports/STM32/LLD/BDMAv1/stm32_bdma.h b/os/hal/ports/STM32/LLD/BDMAv1/stm32_bdma.h index 8caeccdd5..4a252968b 100644 --- a/os/hal/ports/STM32/LLD/BDMAv1/stm32_bdma.h +++ b/os/hal/ports/STM32/LLD/BDMAv1/stm32_bdma.h @@ -121,10 +121,8 @@ STM32_BDMA_CR_MSIZE_MASK) #define STM32_BDMA_CR_PL_MASK BDMA_CCR_PL_Msk #define STM32_BDMA_CR_PL(n) ((n) << 12U) -#if !defined(STM32_ENFORCE_H7_REV_XY) #define STM32_BDMA_CR_DBM BDMA_CCR_DBM #define STM32_BDMA_CR_CM BDMA_CCR_CT -#endif /** @} */ /** @@ -432,6 +430,20 @@ typedef struct { ; \ bdmaStreamDisable(stp); \ } + +/** + * @brief BDMA stream current target. + * @note This function can be invoked in both ISR or thread context. + * @pre The stream must have been allocated using @p bdmaStreamAllocate(). + * @post After use the stream can be released using @p bdmaStreamRelease(). + * + * @param[in] stp pointer to an @p stm32_bdma_stream_t structure + * @return Current memory target index. + * + * @special + */ +#define bdmaStreamGetCurrentTarget(stp) \ + (((stp)->channel->CCR >> BDMA_CCR_CT_Pos) & 1U) /** @} */ /*===========================================================================*/