[rtems commit] bsp/stm32h7: Fix warnings
Sebastian Huber
sebh at rtems.org
Tue Oct 27 05:14:35 UTC 2020
Module: rtems
Branch: master
Commit: c44e404888bb99c1b3ff3052907c9df012d80fb9
Changeset: http://git.rtems.org/rtems/commit/?id=c44e404888bb99c1b3ff3052907c9df012d80fb9
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri Apr 3 11:12:53 2020 +0200
bsp/stm32h7: Fix warnings
Update #3910.
---
bsps/arm/stm32h7/hal/stm32h7xx_hal_dma.c | 16 ++++++++--------
bsps/arm/stm32h7/hal/stm32h7xx_hal_dma_ex.c | 14 +++++++-------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma.c
index e2bbea7..da7510b 100644
--- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma.c
+++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma.c
@@ -439,7 +439,7 @@ HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
}
else
{
- hdma->DMAmuxRequestGen = 0U;
+ hdma->DMAmuxRequestGen = NULL;
hdma->DMAmuxRequestGenStatus = 0U;
hdma->DMAmuxRequestGenStatusMask = 0U;
}
@@ -535,7 +535,7 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
DMAmuxChannel, DMAmuxChannelStatus and DMAmuxChannelStatusMask */
DMA_CalcDMAMUXChannelBaseAndMask(hdma);
- if(hdma->DMAmuxChannel != 0U)
+ if(hdma->DMAmuxChannel != NULL)
{
/* Resett he DMAMUX channel that corresponds to the DMA stream */
hdma->DMAmuxChannel->CCR = 0U;
@@ -557,7 +557,7 @@ HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
}
- hdma->DMAmuxRequestGen = 0U;
+ hdma->DMAmuxRequestGen = NULL;
hdma->DMAmuxRequestGenStatus = 0U;
hdma->DMAmuxRequestGenStatusMask = 0U;
}
@@ -733,7 +733,7 @@ HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress,
hdma->DMAmuxChannel->CCR |= DMAMUX_CxCR_SOIE;
}
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using DMAMUX request generator, enable the DMAMUX request generator overrun IT*/
/* enable the request gen overrun IT */
@@ -860,7 +860,7 @@ HAL_StatusTypeDef HAL_DMA_Abort(DMA_HandleTypeDef *hdma)
/* Clear the DMAMUX synchro overrun flag */
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT */
/* disable the request gen overrun IT */
@@ -932,7 +932,7 @@ HAL_StatusTypeDef HAL_DMA_Abort_IT(DMA_HandleTypeDef *hdma)
/* Clear the DMAMUX synchro overrun flag */
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using DMAMUX request generator, disable the DMAMUX request generator overrun IT*/
/* disable the request gen overrun IT */
@@ -1132,7 +1132,7 @@ HAL_StatusTypeDef HAL_DMA_PollForTransfer(DMA_HandleTypeDef *hdma, HAL_DMA_Level
if(IS_DMA_DMAMUX_ALL_INSTANCE(hdma->Instance) != 0U) /* No DMAMUX available for BDMA1 */
{
/* Check for DMAMUX Request generator (if used) overrun status */
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using DMAMUX request generator Check for DMAMUX request generator overrun */
if((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U)
@@ -1773,7 +1773,7 @@ static void DMA_SetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t
/* Clear the DMAMUX synchro overrun flag */
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* Clear the DMAMUX request generator overrun flag */
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
diff --git a/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma_ex.c b/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma_ex.c
index 6a48d94..294ce8c 100644
--- a/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma_ex.c
+++ b/bsps/arm/stm32h7/hal/stm32h7xx_hal_dma_ex.c
@@ -183,7 +183,7 @@ HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t S
/* Clear the DMAMUX synchro overrun flag */
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* Clear the DMAMUX request generator overrun flag */
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
@@ -279,7 +279,7 @@ HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_
/* Clear the DMAMUX synchro overrun flag */
hdma->DMAmuxChannelStatus->CFR = hdma->DMAmuxChannelStatusMask;
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* Clear the DMAMUX request generator overrun flag */
hdma->DMAmuxRequestGenStatus->RGCFR = hdma->DMAmuxRequestGenStatusMask;
@@ -319,7 +319,7 @@ HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_
hdma->DMAmuxChannel->CCR |= DMAMUX_CxCR_SOIE;
}
- if(hdma->DMAmuxRequestGen != 0U)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using DMAMUX request generator, enable the DMAMUX request generator overrun IT*/
/* enable the request gen overrun IT*/
@@ -486,7 +486,7 @@ HAL_StatusTypeDef HAL_DMAEx_ConfigMuxRequestGenerator (DMA_HandleTypeDef *hdma,
/* check if the DMA state is ready
and DMA is using a DMAMUX request generator block
*/
- if(hdma->DMAmuxRequestGen == 0U)
+ if(hdma->DMAmuxRequestGen == NULL)
{
/* Set the error code to busy */
hdma->ErrorCode = HAL_DMA_ERROR_PARAM;
@@ -535,7 +535,7 @@ HAL_StatusTypeDef HAL_DMAEx_EnableMuxRequestGenerator (DMA_HandleTypeDef *hdma)
/* check if the DMA state is ready
and DMA is using a DMAMUX request generator block */
- if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0U))
+ if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != NULL))
{
/* Enable the request generator*/
hdma->DMAmuxRequestGen->RGCR |= DMAMUX_RGxCR_GE;
@@ -561,7 +561,7 @@ HAL_StatusTypeDef HAL_DMAEx_DisableMuxRequestGenerator (DMA_HandleTypeDef *hdma)
/* check if the DMA state is ready
and DMA is using a DMAMUX request generator block */
- if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != 0U))
+ if((hdma->State != HAL_DMA_STATE_RESET) && (hdma->DMAmuxRequestGen != NULL))
{
/* Disable the request generator*/
hdma->DMAmuxRequestGen->RGCR &= ~DMAMUX_RGxCR_GE;
@@ -601,7 +601,7 @@ void HAL_DMAEx_MUX_IRQHandler(DMA_HandleTypeDef *hdma)
}
}
- if(hdma->DMAmuxRequestGen != 0)
+ if(hdma->DMAmuxRequestGen != NULL)
{
/* if using a DMAMUX request generator block Check for DMAMUX request generator overrun */
if((hdma->DMAmuxRequestGenStatus->RGSR & hdma->DMAmuxRequestGenStatusMask) != 0U)
More information about the vc
mailing list