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

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

?? stm32f10x_gpio.c

?? LCD液晶顯示驅動,芯片為ST7565,
?? C
?? 第 1 頁 / 共 2 頁
字號:
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); 
  
  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..G) to select the GPIO peripheral.
* Output         : None
* Return         : GPIO output data port value.
*******************************************************************************/
u16 GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
    
  return ((u16)GPIOx->ODR);
}

/*******************************************************************************
* Function Name  : GPIO_SetBits
* Description    : Sets the selected data port bits.
* Input          : - GPIOx: where x can be (A..G) 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_ALL_PERIPH(GPIOx));
  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..G) 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_ALL_PERIPH(GPIOx));
  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..G) 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_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;
  }
}

/*******************************************************************************
* Function Name  : GPIO_Write
* Description    : Writes data to the specified GPIO data port.
* Input          : - GPIOx: where x can be (A..G) 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)
{
  /* Check the parameters */
  assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  
  GPIOx->ODR = PortVal;
}

/*******************************************************************************
* Function Name  : GPIO_PinLockConfig
* Description    : Locks GPIO Pins configuration registers.
* Input          : - GPIOx: where x can be (A..G) 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_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;
}

/*******************************************************************************
* 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_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 |= (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_TIM5CH4_LSI
*                       - GPIO_Remap_ADC1_ETRGINJ
*                       - GPIO_Remap_ADC1_ETRGREG
*                       - GPIO_Remap_ADC2_ETRGINJ
*                       - GPIO_Remap_ADC2_ETRGREG
*                       - 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_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 = ((u32)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;
}

/*******************************************************************************
* 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.
*                    This parameter can be GPIO_PortSourceGPIOx where x can be
*                    (A..G).
*                  - 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_EXTI_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 2008 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一级中文字幕一区二区| 国产精品拍天天在线| 精品一区二区免费视频| 国产清纯白嫩初高生在线观看91 | 亚洲日本va午夜在线电影| 欧美在线色视频| 紧缚奴在线一区二区三区| 亚洲精品中文字幕在线观看| 色呦呦网站一区| 国产又粗又猛又爽又黄91精品| 国产精品国产三级国产aⅴ无密码| 欧美高清你懂得| 成人久久视频在线观看| 一区二区不卡在线视频 午夜欧美不卡在| 88在线观看91蜜桃国自产| 成人毛片老司机大片| 午夜精品福利视频网站| 久久精品在线免费观看| 欧美日韩一区二区三区在线看| 国产精品一区一区| 天天综合天天综合色| 日韩伦理av电影| 欧美tk—视频vk| 欧美日韩免费高清一区色橹橹| 久久99国产精品成人| 亚洲成人免费电影| 国产精品乱人伦一区二区| 91精品久久久久久久99蜜桃| 色综合久久久久网| 粉嫩aⅴ一区二区三区四区| 亚洲精品视频在线观看免费| 国产亚洲综合色| 精品日韩在线一区| 欧美欧美欧美欧美首页| 色婷婷久久综合| 成人av网站免费| 国产成人丝袜美腿| 久久国产精品无码网站| 舔着乳尖日韩一区| 亚洲成人资源在线| 专区另类欧美日韩| 国产精品初高中害羞小美女文| 亚洲精品在线三区| 欧美高清hd18日本| 色狠狠综合天天综合综合| 成人黄色在线视频| 国产成人综合精品三级| 韩国精品主播一区二区在线观看| 日本不卡的三区四区五区| 亚洲午夜电影在线| 夜夜嗨av一区二区三区四季av| 国产精品国产三级国产普通话蜜臀 | 欧美一区二区三区四区五区| 一本久道中文字幕精品亚洲嫩| 成人在线视频一区二区| 狠狠色狠狠色综合系列| 九九热在线视频观看这里只有精品| 日韩在线播放一区二区| 日韩一区欧美二区| 日本视频一区二区| 日本不卡123| 亚洲一区二区在线免费观看视频 | caoporm超碰国产精品| 丁香婷婷深情五月亚洲| 国产 日韩 欧美大片| 国产精品中文欧美| 美女视频黄免费的久久| 美女免费视频一区| 韩国在线一区二区| 国产suv精品一区二区6| 99国产麻豆精品| 99riav久久精品riav| 欧美亚洲高清一区| 欧美日本韩国一区二区三区视频| 91精品国产高清一区二区三区蜜臀 | 在线视频综合导航| 欧美日韩欧美一区二区| 欧美日韩国产三级| 欧美一区二区三区色| 欧美美女直播网站| 日韩久久精品一区| 91精品国产综合久久精品| 91麻豆精品国产91久久久久久 | 亚洲成人7777| 欧美aaaaa成人免费观看视频| 免费成人在线观看视频| 国产老妇另类xxxxx| 91丨九色丨蝌蚪丨老版| 91丨九色丨蝌蚪富婆spa| 这里只有精品视频在线观看| 日韩一级二级三级精品视频| 久久精品亚洲精品国产欧美| 久久久99精品免费观看| 伊人婷婷欧美激情| 日韩av一区二区在线影视| 国产精品99精品久久免费| 色哟哟日韩精品| 在线免费观看不卡av| 精品人在线二区三区| 国产精品第一页第二页第三页| 亚洲午夜激情av| 久久91精品国产91久久小草| 亚洲国产裸拍裸体视频在线观看乱了 | 成人精品小蝌蚪| 欧美日韩精品电影| 国产精品传媒视频| 精品一区二区日韩| 欧美日韩一区成人| 亚洲丝袜另类动漫二区| 狠狠色狠狠色综合系列| 欧美精品一卡二卡| 亚洲男人的天堂在线观看| 国产成人精品影院| 91精品国产综合久久香蕉麻豆| 亚洲日本va在线观看| 国产.欧美.日韩| 精品国产一区久久| 婷婷开心激情综合| 91国产免费观看| 国产精品久久久久久一区二区三区| 乱一区二区av| 51久久夜色精品国产麻豆| 亚洲伦理在线精品| 不卡的av电影| 国产视频一区在线观看| 亚洲一区二区在线免费观看视频| 国产精品自拍三区| 国产精品污网站| wwww国产精品欧美| aaa欧美大片| 成人污视频在线观看| 欧美日韩一区二区三区高清 | 成人sese在线| 午夜精品视频一区| 久久亚洲精品小早川怜子| 色国产精品一区在线观看| 91免费视频网| 5月丁香婷婷综合| 精品国产乱码久久久久久图片 | 久久97超碰色| 欧美人与禽zozo性伦| 洋洋成人永久网站入口| 色婷婷亚洲一区二区三区| 国产在线一区二区| 亚洲国产电影在线观看| 精品国产一区二区亚洲人成毛片| 一本大道久久a久久综合婷婷| 日韩成人av影视| 中文字幕一区二区三区蜜月| 精品欧美一区二区在线观看| 欧美一二三区在线观看| 九九精品一区二区| 亚洲成人av在线电影| 国产精品久久福利| 国产午夜精品久久久久久免费视| 国产毛片精品视频| 亚洲国产你懂的| 综合久久国产九一剧情麻豆| 99久久精品国产导航| 五月天激情小说综合| 亚洲超丰满肉感bbw| 国产精品国产三级国产普通话99 | 欧美成人r级一区二区三区| 国产.精品.日韩.另类.中文.在线.播放| 一区二区三区波多野结衣在线观看| 成人网男人的天堂| 在线免费观看日本欧美| 国产精品1区2区3区在线观看| 1024成人网色www| 国产精品另类一区| 精品999久久久| 欧美日本在线观看| 欧美日本一区二区三区| av午夜一区麻豆| 91小视频在线| 国产无人区一区二区三区| 国产精品污网站| 亚洲精品乱码久久久久| 亚洲小少妇裸体bbw| 欧美三级韩国三级日本三斤| 日本va欧美va精品发布| 久久只精品国产| 成人综合激情网| 亚洲精品欧美激情| 日韩欧美国产一区二区三区| 国产99精品在线观看| 成人欧美一区二区三区视频网页 | 丝袜亚洲另类欧美| 日韩精品一区二区三区四区视频| 岛国av在线一区| 亚洲精品乱码久久久久久黑人| 制服丝袜一区二区三区| 成人午夜免费av| 亚洲伦在线观看| 久久欧美中文字幕| jizz一区二区| 天堂在线亚洲视频| 久久免费国产精品| 7777女厕盗摄久久久| 成人福利视频网站|