STM32L4xx_HAL_Driver  1.14.0
Extended channel operation functions

DFSDM extended channel operation functions. More...

Functions

HAL_StatusTypeDef HAL_DFDSMEx_ChannelSetPulsesSkipping (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t PulsesValue)
 Set value of pulses skipping. More...
 
HAL_StatusTypeDef HAL_DFDSMEx_ChannelGetPulsesSkipping (DFSDM_Channel_HandleTypeDef *hdfsdm_channel, uint32_t *PulsesValue)
 Get value of pulses skipping. More...
 

Detailed Description

DFSDM extended channel operation functions.

 ===============================================================================
               ##### Extended channel operation functions #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Set and get value of pulses skipping on channel

Function Documentation

◆ HAL_DFDSMEx_ChannelGetPulsesSkipping()

HAL_StatusTypeDef HAL_DFDSMEx_ChannelGetPulsesSkipping ( DFSDM_Channel_HandleTypeDef hdfsdm_channel,
uint32_t *  PulsesValue 
)

Get value of pulses skipping.

Parameters
hdfsdm_channelDFSDM channel handle.
PulsesValueValue of pulses to be skipped.
Return values
HALstatus.

Definition at line 98 of file stm32l4xx_hal_dfsdm_ex.c.

99 {
100  HAL_StatusTypeDef status = HAL_OK;
101 
102  /* Check DFSDM channel state */
103  if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
104  {
105  /* Get value of remaining pulses to be skipped */
106  *PulsesValue = (hdfsdm_channel->Instance->CHDLYR & DFSDM_CHDLYR_PLSSKP);
107  }
108  else
109  {
110  status = HAL_ERROR;
111  }
112  return status;
113 }
return HAL_OK

◆ HAL_DFDSMEx_ChannelSetPulsesSkipping()

HAL_StatusTypeDef HAL_DFDSMEx_ChannelSetPulsesSkipping ( DFSDM_Channel_HandleTypeDef hdfsdm_channel,
uint32_t  PulsesValue 
)

Set value of pulses skipping.

Parameters
hdfsdm_channelDFSDM channel handle.
PulsesValueValue of pulses to be skipped. This parameter must be a number between Min_Data = 0 and Max_Data = 63.
Return values
HALstatus.

Definition at line 72 of file stm32l4xx_hal_dfsdm_ex.c.

73 {
74  HAL_StatusTypeDef status = HAL_OK;
75 
76  /* Check pulses value */
77  assert_param(IS_DFSDM_CHANNEL_SKIPPING_VALUE(PulsesValue));
78 
79  /* Check DFSDM channel state */
80  if (hdfsdm_channel->State == HAL_DFSDM_CHANNEL_STATE_READY)
81  {
82  /* Set new value of pulses skipping */
83  hdfsdm_channel->Instance->CHDLYR = (PulsesValue & DFSDM_CHDLYR_PLSSKP);
84  }
85  else
86  {
87  status = HAL_ERROR;
88  }
89  return status;
90 }
return HAL_OK
assert_param(IS_RTC_WAKEUP_CLOCK(WakeUpClock))