当前位置: 首页>>代码示例>>C++>>正文


C++ BSP_IO_ITClear函数代码示例

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


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

示例1: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks.
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  static JOYState_TypeDef JoyState = JOY_NONE;
  
  if(GPIO_Pin == GPIO_PIN_2)
  {    
    /* Get the Joystick State */
    JoyState = BSP_JOY_GetState();
    
    MSC_DEMO_ProbeKey(JoyState); 
    
    switch(JoyState)
    {
    case JOY_LEFT:
      LCD_LOG_ScrollBack();
      break;
           
    case JOY_RIGHT:
      LCD_LOG_ScrollForward();
      break;          
      
    default:
      break;           
    }
    /* Clear joystick interrupt pending bits */
    BSP_IO_ITClear(JOY_ALL_PINS);
  }
}
开发者ID:451506709,项目名称:automated_machine,代码行数:33,代码来源:menu.c

示例2: ethernetif_notify_conn_changed

/**
  * @brief  This function notify user about link status changement.
  * @param  netif: the network interface
  * @retval None
  */
void ethernetif_notify_conn_changed(struct netif *netif)
{
  struct ip_addr ipaddr;
  struct ip_addr netmask;
  struct ip_addr gw;
  
  if(netif_is_link_up(netif))
  {
    IP4_ADDR(&ipaddr, IP_ADDR0, IP_ADDR1, IP_ADDR2, IP_ADDR3);
    IP4_ADDR(&netmask, NETMASK_ADDR0, NETMASK_ADDR1 , NETMASK_ADDR2, NETMASK_ADDR3);
    IP4_ADDR(&gw, GW_ADDR0, GW_ADDR1, GW_ADDR2, GW_ADDR3);    
    
    netif_set_addr(netif, &ipaddr , &netmask, &gw);
    
    /* When the netif is fully configured this function must be called.*/
    netif_set_up(netif);      
    
    BSP_LED_Off(LED2);
    BSP_LED_On(LED1);    
  }
  else
  {    
    /*  When the netif link is down this function must be called.*/
    netif_set_down(netif);
    
    BSP_LED_Off(LED1);
    BSP_LED_On(LED2);   
  }
  
  /* Clear IO Expander Interrupt flag */
  BSP_IO_ITClear();
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:37,代码来源:app_ethernet.c

示例3: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks.
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{  
  __IO JOYState_TypeDef JoyState = JOY_NONE;
  
  if(GPIO_Pin == GPIO_PIN_8)
  {    
    /* Get the Joystick State */
    JoyState = BSP_JOY_GetState();
    
    HID_DEMO_ProbeKey(JoyState); 
    
    switch(JoyState)
    {
    case JOY_LEFT:
      LCD_LOG_ScrollBack();
      break;
           
    case JOY_RIGHT:
      LCD_LOG_ScrollForward();
      break;          
      
    default:
      break;           
    }
    /* Clear joystick interrupt pending bits */
    BSP_IO_ITClear();
    osSemaphoreRelease(MenuEvent);
  }
}
开发者ID:nidhiyanandh,项目名称:STM32Cube_FW_F4_V1.5.0_GCC_Makefile,代码行数:34,代码来源:menu.c

示例4: BSP_TS_ITClear

/**
  * @brief  Clears all touch screen interrupts.
  * @param  None
  * @retval None
  */  
void BSP_TS_ITClear(void)
{
  /* Clear all IO IT pin */
  BSP_IO_ITClear();
  
  /* Clear TS IT pending bits */
  TsDrv->ClearIT(TS_I2C_ADDRESS); 
}
开发者ID:Bosvark,项目名称:STM32Cube_FW_F4_V1.1.0,代码行数:13,代码来源:stm32f429i_discovery_ts.c

示例5: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  /* Get the IT status register value */
  if(BSP_IO_ITGetStatus(MII_INT_PIN))
  {
    ethernetif_set_link(&gnetif);
  }
  BSP_IO_ITClear();
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:14,代码来源:main.c

示例6: BSP_SD_DetectIT

/** @brief  SD detect IT treatment.
  * @param  None
  * @retval None
  */
void BSP_SD_DetectIT(void)
{
  /* Clear all pending bits */
  BSP_IO_ITClear();
  
  /* To re-enable IT */
  BSP_SD_ITConfig();
  
  /* SD detect IT callback */
  BSP_SD_DetectCallback();
}
开发者ID:ClintHaerinck,项目名称:STM32Cube_FW_F4,代码行数:15,代码来源:stm324x9i_eval_sd.c

示例7: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  if (GPIO_Pin == MFX_IRQOUT_PIN)
  {
    /* Get the IT status register value */
    if(BSP_IO_ITGetStatus(MII_INT_PIN))
    {
      /* ethernetif_notify_conn_changed(&gnetif);; */
    }
    BSP_IO_ITClear();
  }
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:17,代码来源:vnc_app.c

示例8: HAL_GPIO_EXTI_Callback

/**
  * @brief EXTI line detection callbacks
  * @param GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
    if (GPIO_Pin == MFX_IRQOUT_PIN)
    {
        /* Get the IT status register value */
        if(BSP_IO_ITGetStatus(MII_INT_PIN))
        {
            osSemaphoreRelease(Netif_LinkSemaphore);
        }
        BSP_IO_ITClear();
    }
}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:17,代码来源:main.c

示例9: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks.
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  if(BSP_IO_ITGetStatus(JOY_SEL_PIN) != 0)
  {
    /* SEL is used to pause and resume the audio playback */
    if (PressCount == 1)
    {
      /* Resume playing Wave status */
      PauseResumeStatus = RESUME_STATUS;
      PressCount = 0;
    }
    else
    {
      /* Pause playing Wave status */
      PauseResumeStatus = PAUSE_STATUS;
      PressCount = 1;
    }
  }
  else if(BSP_IO_ITGetStatus(JOY_UP_PIN) != 0)
  {
    /* UP is used to increment the volume of the audio playback */
    volume ++;
    if (volume > 100)
    {
      volume = 100;
    }
    VolumeChange = 1;
  }
  else if(BSP_IO_ITGetStatus(JOY_DOWN_PIN) != 0)
  {
    /* DOWN is used to decrement the volume of the audio playback */
    volume --;
    if ((int8_t)volume < 50)
    {
      volume = 50;
    }
    VolumeChange = 1;
  }
  else if(BSP_IO_ITGetStatus(JOY_RIGHT_PIN) != 0)
  {
    /* Audio change output: speaker only */
    UserOutputMode = OUTPUT_DEVICE_SPEAKER;
  }
  else if(BSP_IO_ITGetStatus(JOY_LEFT_PIN) != 0)
  {
    /* Audio change output: headset only */
    UserOutputMode = OUTPUT_DEVICE_HEADPHONE;
  }

  /* Clear IO Expander IT */
  BSP_IO_ITClear(JOY_ALL_PINS);
}
开发者ID:Lembed,项目名称:STM32CubeF1-mirrors,代码行数:57,代码来源:main.c

示例10: Joystick_exti_demo

/**
  * @brief  Joystick Exti demo
  * @param  None
  * @retval None
  */
void Joystick_exti_demo (void)
{
  uint8_t status = 0;
  uint32_t ITstatus = 0;

  Joystick_SetHint(1);

  status = BSP_JOY_Init(JOY_MODE_EXTI);

  if (status != IO_OK)
  {
    BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
    BSP_LCD_SetTextColor(LCD_COLOR_RED);
    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 95, (uint8_t *)"ERROR", CENTER_MODE);
    BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize()- 80, (uint8_t *)"Joystick cannot be initialized", CENTER_MODE);
  }

  if (status == IO_OK)
  {
    Joystick_SetCursorPosition();
  }	

  while (1)  /* pull for USER button in GPIO mode */
  {
    if (status == IO_OK)
    {
      if (MfxExtiReceived == 1)
      {
        MfxExtiReceived = 0;
        ITstatus = BSP_IO_ITGetStatus(JOY_ALL_PINS);
        if (ITstatus)
        {
          /* Get the Joystick State */
          JoyState = BSP_JOY_GetState();
          Joystick_SetCursorPosition();
        }
        BSP_IO_ITClear();
        /* poll if joystick is still pressed until it is released*/
        while ( BSP_JOY_GetState() != JOY_NONE)
        {
          Joystick_SetCursorPosition();
          HAL_Delay(5);
        }
      }
    }
    if(CheckForUserInput() > 0)
    {
      return;
    }
    HAL_Delay(5);
  }
}
开发者ID:eemei,项目名称:library-stm32f4,代码行数:57,代码来源:joystick.c

示例11: main

/**
* @brief  Main program
* @param  None
* @retval None
*/
int main(void)
{    
  /* STM32F4xx HAL library initialization:
       - Configure the Flash prefetch, instruction and Data caches
       - Configure the Systick to generate an interrupt each 1 msec
       - Set NVIC Group Priority to 4
       - Global MSP (MCU Support Package) initialization
     */
  HAL_Init();  

  /* Configure the system clock to 180 MHz */
  SystemClock_Config();
  
  /* Configure LED1 and LED3 */
  BSP_LED_Init(LED1);
  BSP_LED_Init(LED3);

  /* Configure Key Button */
  BSP_PB_Init(BUTTON_TAMPER, BUTTON_MODE_EXTI);
  
  /* Configure Joystick using MFX in IT mode in order to wakeup system after standby */
  BSP_JOY_Init(JOY_MODE_EXTI);

  /* RTC configuration */
  RTC_Config();
  
  /* Turn on LED1 */
  BSP_LED_On(LED1);

  /* Enable WKUP pin */
  HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN1);

  /* Infinite loop */
  while (1)
  {
    if (AuthorizeToggle)
    {
      /* Toggle LED1 */
      BSP_LED_Toggle(LED1);
      AuthorizeToggle = 0;
    }
    if (MfxExtiReceived)
    {
      /* Clear MFX IT */
      BSP_IO_ITClear();
      MfxExtiReceived = 0;
    }
  }
}
开发者ID:pierreroth64,项目名称:STM32Cube_FW_F4,代码行数:54,代码来源:main.c

示例12: HAL_GPIO_EXTI_Callback

/**
  * @brief  EXTI line detection callbacks.
  * @param  GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  /* If the interruption comes from the Joystick, check which
     Joystick button has been pressed */
  JoyState = BSP_JOY_GetState();

  if(JoyState == JOY_SEL) 
  {
    /* SEL is used to pause and resume the audio playback */
    if (PressCount == 1)
    {
      /* Resume playing Wave status */
      PauseResumeStatus = RESUME_STATUS;
      PressCount = 0;
    }
    else
    {
      /* Pause playing Wave status */
      PauseResumeStatus = PAUSE_STATUS;
      PressCount = 1;
    }
  }
  else if(JoyState == JOY_UP)
  {
    /* UP is used to increment the volume of the audio playback */
    volume ++;
    if (volume > 100)
    {
      volume = 100;
    }
    VolumeChange = 1;
  }
  else if(JoyState == JOY_DOWN)
  {
    /* DOWN is used to decrement the volume of the audio playback */
    volume --;
    if ((int8_t)volume < 50)
    {
      volume = 50;
    }
    VolumeChange = 1;
  }

  /* Clear MFX IT */
  BSP_IO_ITClear();
}
开发者ID:RadMie,项目名称:STM32F7DiscoveryBase,代码行数:51,代码来源:main.c

示例13: HAL_GPIO_EXTI_Callback

/**
  * @brief EXTI line detection callbacks
  * @param GPIO_Pin: Specifies the pins connected EXTI line
  * @retval None
  */
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  
  if (GPIO_Pin == GPIO_PIN_8)
  {
    /* Get the IT status register value */
    if(BSP_IO_ITGetStatus(MII_INT_PIN))
    {
      ethernetif_set_link(&gnetif);
    }
    BSP_IO_ITClear();
  }
  else if (GPIO_Pin == GPIO_PIN_13)
  {
     /*connect to tcp server */ 
     udp_echoclient_send();
  }
}
开发者ID:PaxInstruments,项目名称:STM32CubeF4,代码行数:23,代码来源:main.c

示例14: ethernetif_notify_conn_changed

/**
  * @brief  This function notify user about link status changement.
  * @param  netif: the network interface
  * @retval None
  */
void ethernetif_notify_conn_changed(struct netif *netif)
{
  struct ip_addr ipaddr;
  struct ip_addr netmask;
  struct ip_addr gw;

  if(netif_is_link_up(netif))
  {
    /* IP address setting */
    IP4_ADDR(&ipaddr, ip_address[3], ip_address[2], ip_address[1], ip_address[0]);
    IP4_ADDR(&netmask, sn_mask[3], sn_mask[2] , sn_mask[1], sn_mask[0]);
    IP4_ADDR(&gw, gw_address[3], gw_address[2], gw_address[1], gw_address[0]);
    
    netif_set_addr(netif, &ipaddr , &netmask, &gw);
    
    /* When the netif is fully configured this function must be called.*/
    netif_set_up(netif);
    
    _VNCServer_Notify(NOTIFY_SERVER_NETIF_UP);

    /* If DHCP: re-start process */
    if (_DHCPClinet_TCB != 0)
    {
      /* Update DHCP state machine */
      DHCP_state = DHCP_START;
    }
  }
  else
  {   
    /*  When the netif link is down this function must be called.*/
    netif_set_down(netif);
    
    _VNCServer_Notify(NOTIFY_SERVER_NETIF_DOWN);
    
    /* If DHCP: stop process */
    if (_DHCPClinet_TCB != 0)
    {
      /* Update DHCP state machine */
      DHCP_state = DHCP_LINK_DOWN;
    }
  }
  /* Clear IO Expander Interrupt flag */
  BSP_IO_ITClear();
}
开发者ID:EarnestHein89,项目名称:STM32Cube_FW_F4,代码行数:49,代码来源:vncserver_app.c

示例15: SD_exti_demo

/**
  * @brief  SD Demo exti detection
  * @param  None
  * @retval None
  */
void SD_exti_demo (void)
{ 
  uint32_t ITstatus = 0;

  SD_main_test();

  if(BSP_SD_IsDetected() != SD_PRESENT)
  {
        BSP_SD_Init();
        BSP_LCD_SetTextColor(LCD_COLOR_RED);
        BSP_LCD_DisplayStringAt(20, BSP_LCD_GetYSize()-30, (uint8_t *)"SD Not Connected", LEFT_MODE);
  }
  else 
  {
      BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
      BSP_LCD_DisplayStringAt(20, BSP_LCD_GetYSize()-30,   (uint8_t *)"SD Connected    ", LEFT_MODE);
  }

  BSP_SD_ITConfig();

  while (1)
  {
    if (MfxExtiReceived == 1)
    {
      MfxExtiReceived = 0;
      ITstatus = BSP_IO_ITGetStatus(SD_DETECT_PIN);
      if (ITstatus)
      {
        SD_Detection();
      }
      BSP_IO_ITClear();
      }
    
    if(CheckForUserInput() > 0)
    {
      BSP_SD_DeInit();
      return;
    }
  }
}
开发者ID:451506709,项目名称:automated_machine,代码行数:45,代码来源:sd.c


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