BitAction BitVal 怎么详细操作的

[复制链接]
4085|1
 楼主| 山狼啸月 发表于 2013-10-18 00:22 | 显示全部楼层 |阅读模式
void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
  assert_param(IS_GPIO_BIT_ACTION(BitVal));
  
  if (BitVal != Bit_RESET)
  {
    GPIOx->BSRR = GPIO_Pin;
  }
  else
  {
    GPIOx->BRR = GPIO_Pin;
  }
}
airwill 发表于 2013-10-18 15:40 | 显示全部楼层
这个函数, 一眼就能看明白在干什么, 有什么问题呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

15

主题

217

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部