亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? stm32f10x_gpio.c

?? STM32F10x USB Library V1.0
?? C
?? 第 1 頁 / 共 2 頁
字號:
  
  if ((GPIOx->ODR & GPIO_Pin) != (u32)Bit_RESET)
  {
    bitstatus = (u8)Bit_SET;
  }
  else
  {
    bitstatus = (u8)Bit_RESET;
  }
  return bitstatus;
}

/*******************************************************************************
* Function Name  : GPIO_ReadOutputData
* Description    : Reads the specified GPIO output data port.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
* Output         : None
* Return         : GPIO output data port value.
*******************************************************************************/
u16 GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
{
  return ((u16)GPIOx->ODR);
}

/*******************************************************************************
* Function Name  : GPIO_SetBits
* Description    : Sets the selected data port bits.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
*                  - GPIO_Pin: specifies the port bits to be written.
*                    This parameter can be any combination of GPIO_Pin_x where 
*                    x can be (0..15).
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_SetBits(GPIO_TypeDef* GPIOx, u16 GPIO_Pin)
{
  /* Check the parameters */
  assert_param(IS_GPIO_PIN(GPIO_Pin));
  GPIOx->BSRR = GPIO_Pin;
}

/*******************************************************************************
* Function Name  : GPIO_ResetBits
* Description    : Clears the selected data port bits.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
*                  - GPIO_Pin: specifies the port bits to be written.
*                    This parameter can be any combination of GPIO_Pin_x where 
*                    x can be (0..15).
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_ResetBits(GPIO_TypeDef* GPIOx, u16 GPIO_Pin)
{
  /* Check the parameters */
  assert_param(IS_GPIO_PIN(GPIO_Pin));
  GPIOx->BRR = GPIO_Pin;
}

/*******************************************************************************
* Function Name  : GPIO_WriteBit
* Description    : Sets or clears the selected data port bit.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
*                  - GPIO_Pin: specifies the port bit to be written.
*                    This parameter can be one of GPIO_Pin_x where x can be (0..15).
*                  - BitVal: specifies the value to be written to the selected bit.
*                    This parameter can be one of the BitAction enum values:
*                       - Bit_RESET: to clear the port pin
*                       - Bit_SET: to set the port pin
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_WriteBit(GPIO_TypeDef* GPIOx, u16 GPIO_Pin, BitAction BitVal)
{
  /* Check the parameters */
  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;
  }
}

/*******************************************************************************
* Function Name  : GPIO_Write
* Description    : Writes data to the specified GPIO data port.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
*                  - PortVal: specifies the value to be written to the port output
*                    data register.
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_Write(GPIO_TypeDef* GPIOx, u16 PortVal)
{
  GPIOx->ODR = PortVal;
}

/*******************************************************************************
* Function Name  : GPIO_PinLockConfig
* Description    : Locks GPIO Pins configuration registers.
* Input          : - GPIOx: where x can be (A..E) to select the GPIO peripheral.
*                  - GPIO_Pin: specifies the port bit to be written.
*                    This parameter can be any combination of GPIO_Pin_x where 
*                    x can be (0..15).
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, u16 GPIO_Pin)
{
  u32 tmp = 0x00010000;
  
  /* Check the parameters */
  assert_param(IS_GPIO_PIN(GPIO_Pin));
  
  tmp |= GPIO_Pin;
  /* Set LCKK bit */
  GPIOx->LCKR = tmp;
  /* Reset LCKK bit */
  GPIOx->LCKR =  GPIO_Pin;
  /* Set LCKK bit */
  GPIOx->LCKR = tmp;
  /* Read LCKK bit*/
  tmp = GPIOx->LCKR;
  /* Read LCKK bit*/
  tmp = GPIOx->LCKR;
}

/*******************************************************************************
* Function Name  : GPIO_EventOutputConfig
* Description    : Selects the GPIO pin used as Event output.
* Input          : - GPIO_PortSource: selects the GPIO port to be used as source
*                    for Event output.
*                    This parameter can be GPIO_PortSourceGPIOx where x can be
*                    (A..E).
*                  - GPIO_PinSource: specifies the pin for the Event output.
*                    This parameter can be GPIO_PinSourcex where x can be (0..15).
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_EventOutputConfig(u8 GPIO_PortSource, u8 GPIO_PinSource)
{
  u32 tmpreg = 0x00;

  /* Check the parameters */
  assert_param(IS_GPIO_PORT_SOURCE(GPIO_PortSource));
  assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
    
  tmpreg = AFIO->EVCR;
  /* Clear the PORT[6:4] and PIN[3:0] bits */
  tmpreg &= EVCR_PORTPINCONFIG_MASK;
  tmpreg |= (u32)GPIO_PortSource << 0x04;
  tmpreg |= GPIO_PinSource;

  AFIO->EVCR = tmpreg;
}

/*******************************************************************************
* Function Name  : GPIO_EventOutputCmd
* Description    : Enables or disables the Event Output.
* Input          : - NewState: new state of the Event output.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_EventOutputCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  *(vu32 *) EVCR_EVOE_BB = (u32)NewState;
}

/*******************************************************************************
* Function Name  : GPIO_PinRemapConfig
* Description    : Changes the mapping of the specified pin.
* Input          : - GPIO_Remap: selects the pin to remap.
*                    This parameter can be one of the following values:
*                       - GPIO_Remap_SPI1
*                       - GPIO_Remap_I2C1
*                       - GPIO_Remap_USART1
*                       - GPIO_Remap_USART2
*                       - GPIO_PartialRemap_USART3
*                       - GPIO_FullRemap_USART3
*                       - GPIO_PartialRemap_TIM1
*                       - GPIO_FullRemap_TIM1
*                       - GPIO_PartialRemap1_TIM2
*                       - GPIO_PartialRemap2_TIM2
*                       - GPIO_FullRemap_TIM2
*                       - GPIO_PartialRemap_TIM3
*                       - GPIO_FullRemap_TIM3
*                       - GPIO_Remap_TIM4
*                       - GPIO_Remap1_CAN
*                       - GPIO_Remap2_CAN
*                       - GPIO_Remap_PD01
*                       - GPIO_Remap_SWJ_NoJTRST
*                       - GPIO_Remap_SWJ_JTAGDisable
*                       - GPIO_Remap_SWJ_Disable
*                  - NewState: new state of the port pin remapping.
*                    This parameter can be: ENABLE or DISABLE.
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_PinRemapConfig(u32 GPIO_Remap, FunctionalState NewState)
{
  u32 tmp = 0x00, tmp1 = 0x00, tmpreg = 0x00, tmpmask = 0x00;

  /* Check the parameters */
  assert_param(IS_GPIO_REMAP(GPIO_Remap));
  assert_param(IS_FUNCTIONAL_STATE(NewState));  
  
  tmpreg = AFIO->MAPR;

  tmpmask = (GPIO_Remap & DBGAFR_POSITION_MASK) >> 0x10;
  tmp = GPIO_Remap & LSB_MASK;

  if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
  {
    tmpreg &= DBGAFR_SWJCFG_MASK;
  }
  else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
  {
    tmp1 = ((u32)0x03) << tmpmask;
    tmpreg &= ~tmp1;
  }
  else
  {
    tmpreg &= ~tmp;
  }

  if (NewState != DISABLE)
  {
    if ((GPIO_Remap & DBGAFR_LOCATION_MASK) == DBGAFR_LOCATION_MASK)
    {
      tmpreg |= (tmp << 0x10);
    }
    else
    {
      tmpreg |= tmp;
    }
  }
  AFIO->MAPR = tmpreg;
}

/*******************************************************************************
* Function Name  : GPIO_EXTILineConfig
* Description    : Selects the GPIO pin used as EXTI Line.
* Input          : - GPIO_PortSource: selects the GPIO port to be used as
*                    source for EXTI lines.
*                  - GPIO_PinSource: specifies the EXTI line to be configured.
*                   This parameter can be GPIO_PinSourcex where x can be (0..15).
* Output         : None
* Return         : None
*******************************************************************************/
void GPIO_EXTILineConfig(u8 GPIO_PortSource, u8 GPIO_PinSource)
{
  u32 tmp = 0x00;

  /* Check the parameters */
  assert_param(IS_GPIO_PORT_SOURCE(GPIO_PortSource));
  assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
  
  tmp = ((u32)0x0F) << (0x04 * (GPIO_PinSource & (u8)0x03));

  AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
  AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((u32)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (u8)0x03)));
}

/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品无码一区二区三区| 色狠狠一区二区| 久久综合九色综合97婷婷女人| 日本中文一区二区三区| 日韩欧美电影一区| 国产在线精品免费| 中文字幕国产一区| 色呦呦国产精品| 丝袜亚洲精品中文字幕一区| 日韩视频一区在线观看| 国产一区二区三区香蕉| 国产精品夫妻自拍| 欧美浪妇xxxx高跟鞋交| 国产一区二区三区在线看麻豆| 国产精品福利一区二区| 欧美日韩激情一区二区三区| 精品一区二区日韩| 国产精品国产自产拍高清av| 欧美日韩精品福利| 国产伦精品一区二区三区视频青涩| 日本一区二区三区在线观看| 色综合久久88色综合天天免费| 日韩av一级电影| 欧美国产精品专区| 欧美疯狂做受xxxx富婆| 国产精品一二三区在线| 亚洲女同一区二区| 久久亚洲欧美国产精品乐播 | 日韩欧美黄色影院| 大陆成人av片| 日韩avvvv在线播放| 国产精品美女一区二区在线观看| 欧洲亚洲精品在线| 韩国av一区二区三区| 亚洲综合成人在线视频| 久久影院电视剧免费观看| 欧美在线一二三四区| 国产99久久久国产精品潘金网站| 91在线无精精品入口| 日韩精品一区二区三区视频 | 精品中文字幕一区二区小辣椒| 国产精品视频免费| 欧美一区二区三区不卡| 色综合亚洲欧洲| 国产又粗又猛又爽又黄91精品| 亚洲精品高清在线| 中文一区一区三区高中清不卡| 欧美日韩一级黄| www.久久久久久久久| 久久精品国产亚洲高清剧情介绍| 亚洲免费观看高清完整版在线观看熊| 欧美成人精品1314www| 欧美日韩三级在线| av电影在线观看完整版一区二区| 狠狠色丁香久久婷婷综合丁香| 亚洲精品国产高清久久伦理二区| 久久综合国产精品| 欧美一区二区三区公司| 欧美三级电影在线看| 91婷婷韩国欧美一区二区| 国产成人免费高清| 韩日av一区二区| 看国产成人h片视频| 午夜精品成人在线视频| 一区二区三区在线免费| 日韩理论片中文av| 中文字幕日韩av资源站| 国产精品美日韩| 中文字幕成人av| 国产精品人妖ts系列视频| 久久免费视频一区| 久久婷婷久久一区二区三区| 欧美va亚洲va国产综合| 欧美一区二区免费| 日韩一区二区电影| 欧美一级爆毛片| 日韩精品一区二区三区swag| 91精品国产综合久久久久久漫画 | 欧美zozozo| 精品国产一区二区三区忘忧草 | 欧美一区二区三区视频| 88在线观看91蜜桃国自产| 777精品伊人久久久久大香线蕉| 在线电影院国产精品| 欧美一区二区视频免费观看| 日韩视频一区二区三区在线播放| 91精品久久久久久久久99蜜臂| 日韩免费福利电影在线观看| 日韩欧美黄色影院| 国产无遮挡一区二区三区毛片日本| 日本一区二区视频在线| 国产精品美女久久福利网站| 亚洲人午夜精品天堂一二香蕉| 一个色妞综合视频在线观看| 五月天激情综合| 久久99精品久久久久婷婷| 国产91高潮流白浆在线麻豆| 91原创在线视频| 欧美日韩一区二区三区高清| 日本大胆欧美人术艺术动态| 亚洲色欲色欲www| 亚洲国产va精品久久久不卡综合| 三级久久三级久久| 国产在线播精品第三| 97久久超碰精品国产| 一本一道综合狠狠老| 欧美一级一区二区| 中文字幕乱码久久午夜不卡| 亚洲欧美精品午睡沙发| 日本不卡高清视频| yourporn久久国产精品| 欧美日韩高清一区二区三区| 久久免费的精品国产v∧| 亚洲欧美日韩国产综合| 日韩avvvv在线播放| kk眼镜猥琐国模调教系列一区二区| 欧美日韩成人在线一区| 亚洲国产成人私人影院tom| 亚洲一级二级在线| 国产乱一区二区| 欧洲av一区二区嗯嗯嗯啊| 久久久蜜臀国产一区二区| 一区二区三区四区av| 国产精品1区2区3区| 欧美日韩一本到| 日本一区二区三区高清不卡| 天天影视涩香欲综合网| 成人精品免费视频| 91精品久久久久久久91蜜桃 | 91国偷自产一区二区三区观看| 欧美不卡一区二区| 亚洲国产一区视频| 成人黄色a**站在线观看| 日韩欧美二区三区| 亚洲一二三专区| 波多野结衣的一区二区三区| 欧美电影免费观看高清完整版在线| 亚洲品质自拍视频| 成人国产精品免费观看| 26uuu色噜噜精品一区二区| 日韩成人午夜电影| 欧美亚洲精品一区| 一区二区中文视频| 国产精品一区二区黑丝| 欧美一区二区女人| 天堂久久久久va久久久久| 91在线一区二区三区| 中文字幕不卡三区| 精品在线免费观看| 日韩一卡二卡三卡国产欧美| 午夜精品视频在线观看| 91福利国产成人精品照片| 专区另类欧美日韩| av高清久久久| 国产精品免费视频观看| 国产suv一区二区三区88区| 久久久噜噜噜久噜久久综合| 九色|91porny| 精品国产百合女同互慰| 老司机午夜精品| 精品国产精品网麻豆系列| 久久疯狂做爰流白浆xx| 精品久久人人做人人爱| 激情成人午夜视频| 久久一二三国产| 国产在线精品免费av| 久久精品亚洲精品国产欧美| 国产乱码一区二区三区| 国产喷白浆一区二区三区| 国产一区二区福利视频| 欧美国产精品一区二区| 成人免费毛片高清视频| 国产精品久久久久久久久免费相片| 国产精品77777| 中文字幕精品在线不卡| 91丨porny丨国产| 一区二区三区成人在线视频| 日本韩国欧美三级| 国产激情视频一区二区三区欧美 | 色久综合一二码| 亚洲国产欧美日韩另类综合| 精品视频999| 日韩vs国产vs欧美| 久久综合狠狠综合久久激情| 国产成人亚洲综合色影视| 国产精品久久久久久久午夜片 | 欧美激情综合在线| 99精品欧美一区二区蜜桃免费 | 亚洲精品国产无天堂网2021| 欧美熟乱第一页| 日本不卡一二三区黄网| 久久免费视频一区| 91在线观看地址| 日韩成人一级大片| 久久久久久麻豆| 色婷婷亚洲综合| 久久精品国产亚洲高清剧情介绍 | 精品粉嫩超白一线天av| 丁香啪啪综合成人亚洲小说| 国产精品成人一区二区三区夜夜夜 |