Skip to content

Commit

Permalink
bsp/stm32h7: update STM32h7 BSP HAL code
Browse files Browse the repository at this point in the history
The updated code comes from:
https://github.com/STMicroelectronics/stm32h7xx_hal_driver.git
project and is from "Release v1.10.1"
  • Loading branch information
karelfv authored and kgardas committed Mar 10, 2022
1 parent ec484c5 commit d45f034
Show file tree
Hide file tree
Showing 255 changed files with 369,529 additions and 352,957 deletions.
2,608 changes: 1,317 additions & 1,291 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal.c

Large diffs are not rendered by default.

7,775 changes: 4,054 additions & 3,721 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_adc.c

Large diffs are not rendered by default.

5,115 changes: 2,618 additions & 2,497 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_adc_ex.c

Large diffs are not rendered by default.

2,004 changes: 996 additions & 1,008 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_cec.c

Large diffs are not rendered by default.

2,503 changes: 1,247 additions & 1,256 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_comp.c

Large diffs are not rendered by default.

1,353 changes: 1,353 additions & 0 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_cordic.c

Large diffs are not rendered by default.

1,068 changes: 531 additions & 537 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_cortex.c

Large diffs are not rendered by default.

1,040 changes: 516 additions & 524 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_crc.c

Large diffs are not rendered by default.

451 changes: 223 additions & 228 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_crc_ex.c

Large diffs are not rendered by default.

10,328 changes: 5,178 additions & 5,150 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_cryp.c

Large diffs are not rendered by default.

904 changes: 456 additions & 448 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_cryp_ex.c

Large diffs are not rendered by default.

3,081 changes: 1,541 additions & 1,540 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_dac.c

Large diffs are not rendered by default.

1,754 changes: 880 additions & 874 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_dac_ex.c

Large diffs are not rendered by default.

2,459 changes: 1,225 additions & 1,234 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_dcmi.c

Large diffs are not rendered by default.

7,607 changes: 3,797 additions & 3,810 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_dfsdm.c

Large diffs are not rendered by default.

271 changes: 133 additions & 138 deletions bsps/arm/stm32h7/hal/stm32h7xx_hal_dfsdm_ex.c
@@ -1,138 +1,133 @@
/**
******************************************************************************
* @file stm32h7xx_hal_dfsdm_ex.c
* @author MCD Application Team
* @brief DFSDM Extended HAL module driver.
* This file provides firmware functions to manage the following
* functionality of the DFSDM Peripheral Controller:
* + Set and get pulses skipping on channel.
*
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/

/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"

/** @addtogroup STM32H7xx_HAL_Driver
* @{
*/

#ifdef HAL_DFSDM_MODULE_ENABLED

#if defined(DFSDM_CHDLYR_PLSSKP)

/** @defgroup DFSDMEx DFSDMEx
* @ingroup RTEMSBSPsARMSTM32H7
* @brief DFSDM Extended HAL module driver
* @{
*/

/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/

/** @defgroup DFSDMEx_Exported_Functions DFSDM Extended Exported Functions
* @ingroup RTEMSBSPsARMSTM32H7
* @{
*/

/** @defgroup DFSDMEx_Exported_Functions_Group1_Channel Extended channel operation functions
* @ingroup RTEMSBSPsARMSTM32H7
* @brief DFSDM extended channel operation functions
*
@verbatim
===============================================================================
##### Extended channel operation functions #####
===============================================================================
[..] This section provides functions allowing to:
(+) Set and get value of pulses skipping on channel
@endverbatim
* @{
*/

/**
* @brief Set value of pulses skipping.
* @param hdfsdm_channel DFSDM channel handle.
* @param PulsesValue Value of pulses to be skipped.
* This parameter must be a number between Min_Data = 0 and Max_Data = 63.
* @retval HAL status.
*/
HAL_StatusTypeDef HAL_DFDSMEx_ChannelSetPulsesSkipping(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t PulsesValue)
{
HAL_StatusTypeDef status = HAL_OK;

/* Check pulses value */
assert_param(IS_DFSDM_CHANNEL_SKIPPING_VALUE(PulsesValue));

/* Check DFSDM channel state */
if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
{
/* Set new value of pulses skipping */
hdfsdm_channel->Instance->CHDLYR = (PulsesValue & DFSDM_CHDLYR_PLSSKP);
}
else
{
status = HAL_ERROR;
}
return status;
}

/**
* @brief Get value of pulses skipping.
* @param hdfsdm_channel DFSDM channel handle.
* @param PulsesValue Value of pulses to be skipped.
* @retval HAL status.
*/
HAL_StatusTypeDef HAL_DFDSMEx_ChannelGetPulsesSkipping(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t *PulsesValue)
{
HAL_StatusTypeDef status = HAL_OK;

/* Check DFSDM channel state */
if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
{
/* Get value of remaining pulses to be skipped */
*PulsesValue = (hdfsdm_channel->Instance->CHDLYR & DFSDM_CHDLYR_PLSSKP);
}
else
{
status = HAL_ERROR;
}
return status;
}

/**
* @}
*/

/**
* @}
*/

/**
* @}
*/

#endif /* DFSDM_CHDLYR_PLSSKP */

#endif /* HAL_DFSDM_MODULE_ENABLED */

/**
* @}
*/

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file stm32h7xx_hal_dfsdm_ex.c
* @author MCD Application Team
* @brief DFSDM Extended HAL module driver.
* This file provides firmware functions to manage the following
* functionality of the DFSDM Peripheral Controller:
* + Set and get pulses skipping on channel.
*
******************************************************************************
* @attention
*
* Copyright (c) 2017 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/

/* Includes ------------------------------------------------------------------*/
#include "stm32h7xx_hal.h"

/** @addtogroup STM32H7xx_HAL_Driver
* @{
*/

#ifdef HAL_DFSDM_MODULE_ENABLED

#if defined(DFSDM_CHDLYR_PLSSKP)

/** @defgroup DFSDMEx DFSDMEx
* @brief DFSDM Extended HAL module driver
* @{
*/

/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/

/** @defgroup DFSDMEx_Exported_Functions DFSDM Extended Exported Functions
* @{
*/

/** @defgroup DFSDMEx_Exported_Functions_Group1_Channel Extended channel operation functions
* @brief DFSDM extended channel operation functions
*
@verbatim
===============================================================================
##### Extended channel operation functions #####
===============================================================================
[..] This section provides functions allowing to:
(+) Set and get value of pulses skipping on channel
@endverbatim
* @{
*/

/**
* @brief Set value of pulses skipping.
* @param hdfsdm_channel DFSDM channel handle.
* @param PulsesValue Value of pulses to be skipped.
* This parameter must be a number between Min_Data = 0 and Max_Data = 63.
* @retval HAL status.
*/
HAL_StatusTypeDef HAL_DFDSMEx_ChannelSetPulsesSkipping(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t PulsesValue)
{
HAL_StatusTypeDef status = HAL_OK;

/* Check pulses value */
assert_param(IS_DFSDM_CHANNEL_SKIPPING_VALUE(PulsesValue));

/* Check DFSDM channel state */
if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
{
/* Set new value of pulses skipping */
hdfsdm_channel->Instance->CHDLYR = (PulsesValue & DFSDM_CHDLYR_PLSSKP);
}
else
{
status = HAL_ERROR;
}
return status;
}

/**
* @brief Get value of pulses skipping.
* @param hdfsdm_channel DFSDM channel handle.
* @param PulsesValue Value of pulses to be skipped.
* @retval HAL status.
*/
HAL_StatusTypeDef HAL_DFDSMEx_ChannelGetPulsesSkipping(DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t *PulsesValue)
{
HAL_StatusTypeDef status = HAL_OK;

/* Check DFSDM channel state */
if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
{
/* Get value of remaining pulses to be skipped */
*PulsesValue = (hdfsdm_channel->Instance->CHDLYR & DFSDM_CHDLYR_PLSSKP);
}
else
{
status = HAL_ERROR;
}
return status;
}

/**
* @}
*/

/**
* @}
*/

/**
* @}
*/

#endif /* DFSDM_CHDLYR_PLSSKP */

#endif /* HAL_DFSDM_MODULE_ENABLED */

/**
* @}
*/

0 comments on commit d45f034

Please sign in to comment.