• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IS_PWR_WAKEUP_PIN函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IS_PWR_WAKEUP_PIN函数的典型用法代码示例。如果您正苦于以下问题:C++ IS_PWR_WAKEUP_PIN函数的具体用法?C++ IS_PWR_WAKEUP_PIN怎么用?C++ IS_PWR_WAKEUP_PIN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IS_PWR_WAKEUP_PIN函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: HAL_PWR_DisableWakeUpPin

/**
  * @brief Disables the Wake-up PINx functionality.
  * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable.
  *         This parameter can be one of the following values:
  *           @arg PWR_WAKEUP_PIN1
  *           @arg PWR_WAKEUP_PIN2 available only on STM32F410xx/STM32F446xx devices
  *           @arg PWR_WAKEUP_PIN3 available only on STM32F410xx devices
  * @retval None
  */
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
  /* Check the parameter */
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));  

  /* Disable the wake up pin */
  CLEAR_BIT(PWR->CSR, WakeUpPinx);
}
开发者ID:Lone-L,项目名称:ECSE426_Final_Project,代码行数:17,代码来源:stm32f4xx_hal_pwr.c


示例2: HAL_PWR_EnableWakeUpPin

/**
  * @brief  Enable the WakeUp PINx functionality.
  * @param  WakeUpPinPolarity: Specifies which Wake-Up pin to enable.
  *          This parameter can be one of the following legacy values, which sets the default:
  *          polarity detection on high level (rising edge):
  *            @arg PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3, PWR_WAKEUP_PIN4,
  *                 PWR_WAKEUP_PIN5, PWR_WAKEUP_PIN6 or one of the following values where
  *                 the user can explicitly states the enabled pin and the chosen polarity.
  *            @arg PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW
  *            @arg PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW
  *            @arg PWR_WAKEUP_PIN3_HIGH or PWR_WAKEUP_PIN3_LOW
  *            @arg PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW
  *            @arg PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW
  *            @arg PWR_WAKEUP_PIN6_HIGH or PWR_WAKEUP_PIN6_LOW
  * @note   PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent.
  * @retval None
  */
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity)
{
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinPolarity));

  /* Enable and Specify the Wake-Up pin polarity and the pull configuration
     for the event detection (rising or falling edge) */
  MODIFY_REG(PWR->WKUPEPR, PWR_EWUP_MASK, WakeUpPinPolarity);
}
开发者ID:pichenettes,项目名称:stmlib,代码行数:25,代码来源:stm32h7xx_hal_pwr.c


示例3: HAL_PWR_DisableWakeUpPin

/**
  * @brief Disables the WakeUp PINx functionality.
  * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable.
  *         This parameter can be one of the following values:
  *           @arg PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3
  * @retval None
  */
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
  __IO uint32_t tmp = 0;
  
  /* Check the parameters */
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));
  tmp = CSR_EWUP1_BB + (WakeUpPinx << 2);
  *(__IO uint32_t *) (tmp) = (uint32_t)DISABLE;
}
开发者ID:alexeystn,项目名称:stm32-ppm-usb-adapter,代码行数:16,代码来源:stm32f3xx_hal_pwr.c


示例4: HAL_PWR_EnableWakeUpPin

/**
  * @brief Enable the WakeUp PINx functionality.
  * @param WakeUpPinPolarity: Specifies which Wake-Up pin to enable.
  *         This parameter can be one of the following legacy values, which sets the default polarity: 
  *         detection on high level (rising edge):
  *           @arg PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3, PWR_WAKEUP_PIN4, PWR_WAKEUP_PIN5, PWR_WAKEUP_PIN6 
  *         or one of the following value where the user can explicitly states the enabled pin and
  *         the chosen polarity  
  *           @arg PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW 
  *           @arg PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW 
  *           @arg PWR_WAKEUP_PIN3_HIGH or PWR_WAKEUP_PIN3_LOW 
  *           @arg PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW
  *           @arg PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW 
  *           @arg PWR_WAKEUP_PIN6_HIGH or PWR_WAKEUP_PIN6_LOW 
  * @note  PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent.               
  * @retval None
  */
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity)
{
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinPolarity));
  
  /* Enable wake-up pin */
  SET_BIT(PWR->CSR2, (PWR_EWUP_MASK & WakeUpPinPolarity));
	
  /* Specifies the Wake-Up pin polarity for the event detection
    (rising or falling edge) */
  MODIFY_REG(PWR->CR2, (PWR_EWUP_MASK & WakeUpPinPolarity), (WakeUpPinPolarity >> 0x06));
}
开发者ID:BryantDai,项目名称:stm32,代码行数:28,代码来源:stm32f7xx_hal_pwr.c


示例5: HAL_PWR_EnableWakeUpPin

/**
  * @brief Enable the WakeUp PINx functionality.
  * @param WakeUpPinPolarity: Specifies which Wake-Up pin to enable.
  *         This parameter can be one of the following legacy values which set the default polarity 
  *         i.e. detection on high level (rising edge):
  *           @arg @ref PWR_WAKEUP_PIN1, PWR_WAKEUP_PIN2, PWR_WAKEUP_PIN3, PWR_WAKEUP_PIN4, PWR_WAKEUP_PIN5
  *             
  *         or one of the following value where the user can explicitly specify the enabled pin and
  *         the chosen polarity:  
  *           @arg @ref PWR_WAKEUP_PIN1_HIGH or PWR_WAKEUP_PIN1_LOW 
  *           @arg @ref PWR_WAKEUP_PIN2_HIGH or PWR_WAKEUP_PIN2_LOW 
  *           @arg @ref PWR_WAKEUP_PIN3_HIGH or PWR_WAKEUP_PIN3_LOW 
  *           @arg @ref PWR_WAKEUP_PIN4_HIGH or PWR_WAKEUP_PIN4_LOW
  *           @arg @ref PWR_WAKEUP_PIN5_HIGH or PWR_WAKEUP_PIN5_LOW 
  * @note  PWR_WAKEUP_PINx and PWR_WAKEUP_PINx_HIGH are equivalent.               
  * @retval None
  */
void HAL_PWR_EnableWakeUpPin(uint32_t WakeUpPinPolarity)
{
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinPolarity)); 
  
  /* Specifies the Wake-Up pin polarity for the event detection 
    (rising or falling edge) */
  MODIFY_REG(PWR->CR4, (PWR_CR3_EWUP & WakeUpPinPolarity), (WakeUpPinPolarity >> PWR_WUP_POLARITY_SHIFT)); 
    
  /* Enable wake-up pin */
  SET_BIT(PWR->CR3, (PWR_CR3_EWUP & WakeUpPinPolarity));

    
}
开发者ID:asebak,项目名称:IMU,代码行数:30,代码来源:stm32l4xx_hal_pwr.c


示例6: PWR_WakeUpPinCmd

/**
  * @brief  Enables or disables the WakeUp Pin functionality.
  * @param  PWR_WakeUpPin: specifies the WakeUpPin.
  *   This parameter can be: PWR_WakeUpPin_1, PWR_WakeUpPin_2 or PWR_WakeUpPin_3.
  * @param  NewState: new state of the WakeUp Pin functionality.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPin, FunctionalState NewState)
{
  __IO uint32_t tmp = 0;
  
  /* Check the parameters */
  assert_param(IS_PWR_WAKEUP_PIN(PWR_WakeUpPin));
  
  assert_param(IS_FUNCTIONAL_STATE(NewState));

  tmp = CSR_EWUP_BB + PWR_WakeUpPin;
  
  *(__IO uint32_t *) (tmp) = (uint32_t)NewState;
}
开发者ID:Tokifuko,项目名称:all-my-projects,代码行数:21,代码来源:stm32l1xx_pwr.c


示例7: PWR_WakeUpPinCmd

/**
  * @brief  Enables or disables the WakeUp Pin functionality.
  * @param  PWR_WakeUpPinx: specifies the WakeUp Pin.
  *          This parameter can be one of the following values:
  *            @arg PWR_WakeUp_Pin1: WKUP1 pin is used for wakeup from Standby mode.
  *            @arg PWR_WakeUp_Pin2: WKUP2 pin is used for wakeup from Standby mode.
  * @param  NewState: new state of the WakeUp Pin functionality.
  *         This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPinx, FunctionalState NewState)
{
  /* Check the parameters */  
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  assert_param(IS_PWR_WAKEUP_PIN(NewState));
  if(PWR_WakeUpPinx == PWR_WakeUp_Pin1)
  {
    *(__IO uint32_t *) CSR_EWUP1_BB = (uint32_t)NewState;
  }
  else /* PWR_WakeUp_Pin1 */
  {
    *(__IO uint32_t *) CSR_EWUP2_BB = (uint32_t)NewState;
  }
}
开发者ID:0xBADCA7,项目名称:lk,代码行数:24,代码来源:stm32f4xx_pwr.c


示例8: PWR_WakeUpPinCmd

/**
  * @brief  Enables or disables the WakeUp Pin functionality.
  * @param  PWR_WakeUpPin: specifies the WakeUpPin.
  *          This parameter can be: PWR_WakeUpPin_1, PWR_WakeUpPin_2 or PWR_WakeUpPin_3.
  * @param  NewState: new state of the WakeUp Pin functionality.
  *          This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPin, FunctionalState NewState)
{
	/* Check the parameters */
	assert_param(IS_PWR_WAKEUP_PIN(PWR_WakeUpPin));
	assert_param(IS_FUNCTIONAL_STATE(NewState));

	if (NewState != DISABLE) {
		/* Enable the EWUPx pin */
		PWR->CSR |= PWR_WakeUpPin;
	} else {
		/* Disable the EWUPx pin */
		PWR->CSR &= ~PWR_WakeUpPin;
	}
}
开发者ID:suxiaocheng,项目名称:stm32_usb_hid,代码行数:22,代码来源:stm32f37x_pwr.c


示例9: PWR_WakeUpPinCmd

/**
  * @brief  Enables or disables the WakeUp Pin functionality.
  * @param  PWR_WakeUpPinx: specifies the WakeUp Pin.
  *          This parameter can be one of the following values:
  *            @arg PWR_WakeUp_Pin1: WKUP1 pin is used for wakeup from Standby mode.
  *            @arg PWR_WakeUp_Pin2: WKUP2 pin is used for wakeup from Standby mode.
  *            @arg PWR_WakeUp_Pin3: WKUP3 pin is used for wakeup from Standby mode.(only for STM32F410xx and STM32F412xG Devices)
  * @param  NewState: new state of the WakeUp Pin functionality.
  *         This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void PWR_WakeUpPinCmd(uint32_t PWR_WakeUpPinx, FunctionalState NewState)
{
  /* Check the parameters */  
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  assert_param(IS_PWR_WAKEUP_PIN(NewState));
  if(PWR_WakeUpPinx == PWR_WakeUp_Pin1) /* PWR_WakeUp_Pin1 */
  {
    *(__IO uint32_t *) CSR_EWUP1_BB = (uint32_t)NewState;
  }
#if defined(STM32F410xx)|| defined(STM32F412xG)  
  else if(PWR_WakeUpPinx == PWR_WakeUp_Pin3) /* PWR_WakeUp_Pin3 */
  {
    *(__IO uint32_t *) CSR_EWUP3_BB = (uint32_t)NewState;
  }
#endif /* STM32F410xx */  
  else /* PWR_WakeUp_Pin2 */
  {
    *(__IO uint32_t *) CSR_EWUP2_BB = (uint32_t)NewState;
  }
}
开发者ID:Grigoryan1,项目名称:Test-Project,代码行数:31,代码来源:stm32f4xx_pwr.c


示例10: HAL_PWR_DisableWakeUpPin

/**
  * @brief Disables the WakeUp PINx functionality.
  * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable.
  *         This parameter can be one of the following values:
  *           @arg PWR_WAKEUP_PIN1
  *           @arg PWR_WAKEUP_PIN2
  *           @arg PWR_WAKEUP_PIN3
  *           @arg PWR_WAKEUP_PIN4
  *           @arg PWR_WAKEUP_PIN5
  *           @arg PWR_WAKEUP_PIN6 
  * @retval None
  */
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));

  CLEAR_BIT(PWR->CSR2, WakeUpPinx);
}
开发者ID:BryantDai,项目名称:stm32,代码行数:18,代码来源:stm32f7xx_hal_pwr.c


示例11: HAL_PWR_DisableWakeUpPin

/**
  * @brief Disables the WakeUp PINx functionality.
  * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable.
  *         This parameter can be one of the following values:
  *           @arg PWR_WAKEUP_PIN1
  * @retval None
  */
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
  /* Check the parameter */
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));  
  *(__IO uint32_t *) CSR_EWUP_BB = (uint32_t)DISABLE;
}
开发者ID:19emtuck,项目名称:micropython,代码行数:13,代码来源:stm32f4xx_hal_pwr.c


示例12: HAL_PWR_DisableWakeUpPin

/**
  * @brief Disables the WakeUp PINx functionality.
  * @param WakeUpPinx: Specifies the Power Wake-Up pin to disable.
  *         This parameter can be values of :
  *           @ref PWREx_WakeUp_Pins
  * @retval None
  */
void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
{
  /* Check the parameters */
  assert_param(IS_PWR_WAKEUP_PIN(WakeUpPinx));
  PWR->CSR &= ~(PWR_CSR_EWUP1 << (uint8_t)WakeUpPinx);
}
开发者ID:Atmango,项目名称:mastering-stm32,代码行数:13,代码来源:stm32f0xx_hal_pwr.c



注:本文中的IS_PWR_WAKEUP_PIN函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IS_RC_MODE_ACTIVE函数代码示例发布时间:2022-05-30
下一篇:
C++ IS_PWR_STOP_ENTRY函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap