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

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

?? stm32f10x_gpio.c

?? STM32SDCardSourceCodeFATFS.rar
?? C
?? 第 1 頁 / 共 2 頁
字號:
}

/**
  * @brief  Reads the specified output data port bit.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  GPIO_Pin:  specifies the port bit to read.
  *   This parameter can be GPIO_Pin_x where x can be (0..15).
  * @retval The output port pin value.
  */
uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
  uint8_t bitstatus = 0x00;
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
  
  if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET)
  {
    bitstatus = (uint8_t)Bit_SET;
  }
  else
  {
    bitstatus = (uint8_t)Bit_RESET;
  }
  return bitstatus;
}

/**
  * @brief  Reads the specified GPIO output data port.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @retval GPIO output data port value.
  */
uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
    
  return ((uint16_t)GPIOx->ODR);
}

/**
  * @brief  Sets the selected data port bits.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  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).
  * @retval None
  */
void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  assert_param(IS_GPIO_PIN(GPIO_Pin));
  
  GPIOx->BSRR = GPIO_Pin;
}

/**
  * @brief  Clears the selected data port bits.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  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).
  * @retval None
  */
void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  assert_param(IS_GPIO_PIN(GPIO_Pin));
  
  GPIOx->BRR = GPIO_Pin;
}

/**
  * @brief  Sets or clears the selected data port bit.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  GPIO_Pin: specifies the port bit to be written.
  *   This parameter can be one of GPIO_Pin_x where x can be (0..15).
  * @param  BitVal: specifies the value to be written to the selected bit.
  *   This parameter can be one of the BitAction enum values:
  *     @arg Bit_RESET: to clear the port pin
  *     @arg Bit_SET: to set the port pin
  * @retval None
  */
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;
  }
}

/**
  * @brief  Writes data to the specified GPIO data port.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  PortVal: specifies the value to be written to the port output data register.
  * @retval None
  */
void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  
  GPIOx->ODR = PortVal;
}

/**
  * @brief  Locks GPIO Pins configuration registers.
  * @param  GPIOx: where x can be (A..G) to select the GPIO peripheral.
  * @param  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).
  * @retval None
  */
void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
  uint32_t tmp = 0x00010000;
  
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  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;
}

/**
  * @brief  Selects the GPIO pin used as Event output.
  * @param  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).
  * @param  GPIO_PinSource: specifies the pin for the Event output.
  *   This parameter can be GPIO_PinSourcex where x can be (0..15).
  * @retval None
  */
void GPIO_EventOutputConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
{
  uint32_t tmpreg = 0x00;
  /* Check the parameters */
  assert_param(IS_GPIO_EVENTOUT_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 |= (uint32_t)GPIO_PortSource << 0x04;
  tmpreg |= GPIO_PinSource;
  AFIO->EVCR = tmpreg;
}

/**
  * @brief  Enables or disables the Event Output.
  * @param  NewState: new state of the Event output.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void GPIO_EventOutputCmd(FunctionalState NewState)
{
  /* Check the parameters */
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  
  *(__IO uint32_t *) EVCR_EVOE_BB = (uint32_t)NewState;
}

/**
  * @brief  Changes the mapping of the specified pin.
  * @param  GPIO_Remap: selects the pin to remap.
  *   This parameter can be one of the following values:
  *     @arg GPIO_Remap_SPI1
  *     @arg GPIO_Remap_I2C1
  *     @arg GPIO_Remap_USART1
  *     @arg GPIO_Remap_USART2
  *     @arg GPIO_PartialRemap_USART3
  *     @arg GPIO_FullRemap_USART3
  *     @arg GPIO_PartialRemap_TIM1
  *     @arg GPIO_FullRemap_TIM1
  *     @arg GPIO_PartialRemap1_TIM2
  *     @arg GPIO_PartialRemap2_TIM2
  *     @arg GPIO_FullRemap_TIM2
  *     @arg GPIO_PartialRemap_TIM3
  *     @arg GPIO_FullRemap_TIM3
  *     @arg GPIO_Remap_TIM4
  *     @arg GPIO_Remap1_CAN1
  *     @arg GPIO_Remap2_CAN1
  *     @arg GPIO_Remap_PD01
  *     @arg GPIO_Remap_TIM5CH4_LSI
  *     @arg GPIO_Remap_ADC1_ETRGINJ
  *     @arg GPIO_Remap_ADC1_ETRGREG
  *     @arg GPIO_Remap_ADC2_ETRGINJ
  *     @arg GPIO_Remap_ADC2_ETRGREG
  *     @arg GPIO_Remap_ETH
  *     @arg GPIO_Remap_CAN2  
  *     @arg GPIO_Remap_SWJ_NoJTRST
  *     @arg GPIO_Remap_SWJ_JTAGDisable
  *     @arg GPIO_Remap_SWJ_Disable
  *     @arg GPIO_Remap_SPI3
  *     @arg GPIO_Remap_TIM2ITR1_PTP_SOF
  *     @arg GPIO_Remap_PTP_PPS  
  * @note  If the GPIO_Remap_TIM2ITR1_PTP_SOF is enabled the TIM2 ITR1 is connected 
  *        to Ethernet PTP output. When Reset TIM2 ITR1 is connected to USB OTG SOF output.       
  * @param  NewState: new state of the port pin remapping.
  *   This parameter can be: ENABLE or DISABLE.
  * @retval None
  */
void GPIO_PinRemapConfig(uint32_t GPIO_Remap, FunctionalState NewState)
{
  uint32_t 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_NUMBITS_MASK)) == (DBGAFR_LOCATION_MASK | DBGAFR_NUMBITS_MASK))
  {
    tmpreg &= DBGAFR_SWJCFG_MASK;
    AFIO->MAPR &= DBGAFR_SWJCFG_MASK;
  }
  else if ((GPIO_Remap & DBGAFR_NUMBITS_MASK) == DBGAFR_NUMBITS_MASK)
  {
    tmp1 = ((uint32_t)0x03) << tmpmask;
    tmpreg &= ~tmp1;
    tmpreg |= ~DBGAFR_SWJCFG_MASK;
  }
  else
  {
    tmpreg &= ~(tmp << ((GPIO_Remap >> 0x15)*0x10));
    tmpreg |= ~DBGAFR_SWJCFG_MASK;
  }

  if (NewState != DISABLE)
  {
    tmpreg |= (tmp << ((GPIO_Remap >> 0x15)*0x10));
  }

  AFIO->MAPR = tmpreg;
}

/**
  * @brief  Selects the GPIO pin used as EXTI Line.
  * @param  GPIO_PortSource: selects the GPIO port to be used as source for EXTI lines.
  *   This parameter can be GPIO_PortSourceGPIOx where x can be (A..G).
  * @param  GPIO_PinSource: specifies the EXTI line to be configured.
  *   This parameter can be GPIO_PinSourcex where x can be (0..15).
  * @retval None
  */
void GPIO_EXTILineConfig(uint8_t GPIO_PortSource, uint8_t GPIO_PinSource)
{
  uint32_t tmp = 0x00;
  /* Check the parameters */
  assert_param(IS_GPIO_EXTI_PORT_SOURCE(GPIO_PortSource));
  assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
  
  tmp = ((uint32_t)0x0F) << (0x04 * (GPIO_PinSource & (uint8_t)0x03));
  AFIO->EXTICR[GPIO_PinSource >> 0x02] &= ~tmp;
  AFIO->EXTICR[GPIO_PinSource >> 0x02] |= (((uint32_t)GPIO_PortSource) << (0x04 * (GPIO_PinSource & (uint8_t)0x03)));
}

/**
  * @brief  Selects the Ethernet media interface.
  * @note   This function applies only to STM32 Connectivity line devices.  
  * @param  GPIO_ETH_MediaInterface: specifies the Media Interface mode.
  *   This parameter can be one of the following values:
  *     @arg GPIO_ETH_MediaInterface_MII: MII mode
  *     @arg GPIO_ETH_MediaInterface_RMII: RMII mode    
  * @retval None
  */
void GPIO_ETH_MediaInterfaceConfig(uint32_t GPIO_ETH_MediaInterface) 
{ 
  assert_param(IS_GPIO_ETH_MEDIA_INTERFACE(GPIO_ETH_MediaInterface)); 

  /* Configure MII_RMII selection bit */ 
  *(__IO uint32_t *) MAPR_MII_RMII_SEL_BB = GPIO_ETH_MediaInterface; 
}
  
/**
  * @}
  */

/**
  * @}
  */

/**
  * @}
  */

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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影在线一区| 色天使久久综合网天天| 99精品国产91久久久久久| 欧美日韩国产色站一区二区三区| 久久新电视剧免费观看| 亚洲大型综合色站| a亚洲天堂av| 国产欧美一区二区精品性| 日韩精品一区第一页| 欧美在线小视频| 国产精品久久99| 国产一区二区三区黄视频| 91精品国产aⅴ一区二区| 1区2区3区国产精品| 国产风韵犹存在线视精品| 日韩精品一区国产麻豆| 爽好久久久欧美精品| 日本道精品一区二区三区| 国产精品福利av| 粉嫩aⅴ一区二区三区四区 | 麻豆国产一区二区| 欧美美女一区二区| 亚洲国产中文字幕在线视频综合| www.欧美亚洲| 亚洲视频免费在线| 成人自拍视频在线观看| 制服丝袜亚洲精品中文字幕| 亚洲mv在线观看| 欧美日韩国产电影| 石原莉奈一区二区三区在线观看| 欧美三级三级三级| 偷拍一区二区三区| 欧美日本高清视频在线观看| 亚洲福利视频三区| 欧美电影在线免费观看| 日韩国产欧美在线视频| 欧美电视剧在线看免费| 美女mm1313爽爽久久久蜜臀| 日韩免费性生活视频播放| 黄一区二区三区| 国产亚洲制服色| jizzjizzjizz欧美| 亚洲精品ww久久久久久p站| 欧美伊人久久久久久午夜久久久久| 一区二区三区影院| 欧美三级日本三级少妇99| 久久aⅴ国产欧美74aaa| 国产日韩av一区二区| 一本色道久久综合亚洲91| 亚洲一区在线观看网站| 555夜色666亚洲国产免| 精品一区二区三区影院在线午夜| 久久久久久久久久久久电影 | 色欧美日韩亚洲| 天堂va蜜桃一区二区三区 | 老色鬼精品视频在线观看播放| 日韩精品一区二区在线观看| 国产成人综合视频| 亚洲精品久久久久久国产精华液| 欧美日韩国产a| 狠狠色丁香久久婷婷综| 国产精品久99| 日韩三级视频在线看| 成人爽a毛片一区二区免费| 亚洲欧美自拍偷拍| 欧美一区二区三区不卡| 成人sese在线| 蜜臀91精品一区二区三区| 亚洲欧洲精品一区二区三区| 制服丝袜亚洲色图| 99国产精品久| 国产一区 二区| 亚洲小说欧美激情另类| 国产蜜臀97一区二区三区| 欧美日韩国产美女| 成人ar影院免费观看视频| 日韩中文字幕亚洲一区二区va在线| 国产日产欧美一区二区三区 | 91视频免费观看| 久久精品国产精品亚洲精品 | 国产精品女主播在线观看| 美女网站色91| 亚洲天堂成人在线观看| 51精品久久久久久久蜜臀| 99re这里只有精品首页| 国产精品自拍网站| 日日摸夜夜添夜夜添国产精品 | 在线中文字幕一区二区| 精品亚洲免费视频| 亚洲人成网站色在线观看| 久久新电视剧免费观看| 91精品国产综合久久精品| av亚洲精华国产精华| 国产老妇另类xxxxx| 美女一区二区久久| 天天色综合天天| 亚洲午夜免费福利视频| 亚洲免费观看高清完整版在线观看熊| 久久久久99精品国产片| 欧美不卡在线视频| 欧美一级片在线看| 欧美一三区三区四区免费在线看| 欧美午夜不卡在线观看免费| 色综合久久久久综合| 99热在这里有精品免费| 粉嫩13p一区二区三区| 国产精品一区在线观看乱码 | 日产精品久久久久久久性色| 一区二区三区国产| 伊人婷婷欧美激情| 一区二区三区日韩精品| 亚洲天堂精品在线观看| 最新日韩av在线| 亚洲免费成人av| 一区二区三区四区激情| 亚洲色图制服诱惑| 中文字幕国产一区| 欧美国产一区二区| 国产精品久久久久久久岛一牛影视 | 久久久久国产成人精品亚洲午夜| 日韩精品一区二区三区在线| 亚洲精品在线三区| 久久综合狠狠综合久久综合88| 日本精品视频一区二区三区| 在线视频综合导航| 欧美日韩精品欧美日韩精品一 | 久久久久久综合| 国产日韩影视精品| 欧美美女喷水视频| 欧美电影免费观看高清完整版在线 | 国产精品99久久久久久似苏梦涵| 日韩成人av影视| 奇米777欧美一区二区| 精品一区二区在线视频| 国产麻豆成人精品| 成人福利在线看| 在线视频综合导航| 日韩欧美国产三级电影视频| 精品不卡在线视频| 国产亚洲欧美日韩俺去了| 中文字幕中文字幕一区二区| 日韩一区欧美一区| 亚洲成人av电影| 精品一区二区三区久久久| 国产iv一区二区三区| 91影院在线免费观看| 日韩视频免费观看高清完整版 | 亚洲国产中文字幕| 日本午夜精品视频在线观看| 国产成人欧美日韩在线电影| 91蜜桃网址入口| 久久久久久久一区| 中文字幕精品一区| 亚洲成人综合视频| 成人性视频免费网站| 在线观看三级视频欧美| 欧美精品一区二区三区蜜臀| 国产偷国产偷亚洲高清人白洁| 1000精品久久久久久久久| 男女激情视频一区| 日本精品裸体写真集在线观看 | 蜜臀va亚洲va欧美va天堂| 国产91在线观看| 91在线视频播放地址| 欧美精品丝袜中出| 国产精品国产三级国产三级人妇 | 一区二区三区中文在线| 久久国产精品第一页| 在线观看av一区| 日韩欧美不卡在线观看视频| 亚洲男人天堂av| 成人午夜在线播放| 日韩精品一区二区三区在线播放| 亚洲线精品一区二区三区| av激情成人网| 久久嫩草精品久久久精品| 免费国产亚洲视频| 欧美系列日韩一区| 亚洲美女免费视频| 床上的激情91.| 精品久久久网站| 免费成人你懂的| 欧美久久久久中文字幕| 尤物av一区二区| 成人av小说网| 国产亚洲精品aa| 黑人巨大精品欧美黑白配亚洲| 欧美日韩和欧美的一区二区| 最新欧美精品一区二区三区| 成人黄色a**站在线观看| 久久久午夜精品理论片中文字幕| 日本女人一区二区三区| 欧美日韩极品在线观看一区| 亚洲国产综合视频在线观看| 欧美亚洲一区三区| 亚洲一区视频在线| 欧美人妖巨大在线| 图片区日韩欧美亚洲| 欧美精品自拍偷拍动漫精品| 亚洲一区av在线|