• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ HAL_UART_IRQHandler函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: UART4_IRQHandler

/**
* @brief This function handles UART4 global interrupt.
*/
void UART4_IRQHandler(void)
{
  /* USER CODE BEGIN UART4_IRQn 0 */

  /* USER CODE END UART4_IRQn 0 */
  HAL_UART_IRQHandler(&huart4);
  /* USER CODE BEGIN UART4_IRQn 1 */

  /* USER CODE END UART4_IRQn 1 */
}
开发者ID:CynaCons,项目名称:stm32_BluTechDevice,代码行数:13,代码来源:stm32f1xx_it.c


示例2: USART3_IRQHandler

/**
* @brief This function handles USART3 global interrupt.
*/
void USART3_IRQHandler(void)
{
  /* USER CODE BEGIN USART3_IRQn 0 */

  /* USER CODE END USART3_IRQn 0 */
  HAL_UART_IRQHandler(&huart3);
  /* USER CODE BEGIN USART3_IRQn 1 */

  /* USER CODE END USART3_IRQn 1 */
}
开发者ID:csorvagep,项目名称:robotcar,代码行数:13,代码来源:stm32f4xx_it.c


示例3: UART4_IRQHandler

/**
* @brief This function handles UART4 global interrupt.
*/
void UART4_IRQHandler(void)
{
  /* USER CODE BEGIN UART4_IRQn 0 */
  SEGGER_SYSVIEW_RecordEnterISR();
  HAL_GPS_UART_IRQHandler(&huart4);
  /* USER CODE END UART4_IRQn 0 */
  HAL_UART_IRQHandler(&huart4);
  /* USER CODE BEGIN UART4_IRQn 1 */
  SEGGER_SYSVIEW_RecordEnterISR();
  /* USER CODE END UART4_IRQn 1 */
}
开发者ID:librespacefoundation,项目名称:upsat-adcs-software,代码行数:14,代码来源:stm32f4xx_it.c


示例4: USART2_IRQHandler

/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
  /* USER CODE BEGIN USART2_IRQn 0 */
  SEGGER_SYSVIEW_RecordEnterISR();
  HAL_ADCS_UART_IRQHandler(&huart2);
  /* USER CODE END USART2_IRQn 0 */
  HAL_UART_IRQHandler(&huart2);
  /* USER CODE BEGIN USART2_IRQn 1 */
  SEGGER_SYSVIEW_RecordEnterISR();
  /* USER CODE END USART2_IRQn 1 */
}
开发者ID:librespacefoundation,项目名称:upsat-adcs-software,代码行数:14,代码来源:stm32f4xx_it.c


示例5: USART6_IRQHandler

/**
* @brief This function handles USART6 global interrupt.
*/
void USART6_IRQHandler(void)
{
  /* USER CODE BEGIN USART6_IRQn 0 */

  /* USER CODE END USART6_IRQn 0 */
  HAL_NVIC_ClearPendingIRQ(USART6_IRQn);
  HAL_UART_IRQHandler(&huart6);
  /* USER CODE BEGIN USART6_IRQn 1 */

  /* USER CODE END USART6_IRQn 1 */
}
开发者ID:RMRobotics,项目名称:navxmxp,代码行数:14,代码来源:stm32f4xx_it.c


示例6: USART1_IRQHandler

void USART1_IRQHandler(void)
{
	portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
	
  HAL_UART_IRQHandler(&huart1);
	
	/* If lHigherPriorityTaskWoken is now equal to pdTRUE, then a context
	switch should be performed before the interrupt exists.  That ensures the
	unblocked (higher priority) task is returned to immediately. */
	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
	
}
开发者ID:OUWECAD,项目名称:MOWE,代码行数:12,代码来源:stm32f0xx_it.c


示例7: UART4_IRQHandler

void UART4_IRQHandler(void)
{
 HAL_UART_IRQHandler(&huart4);
 
     HAL_UART_Receive_IT( &huart4 , string , 154);  
   
     if( (string[0] == 'm') && (string[152] == 'n') ){
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_13 , GPIO_PIN_SET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_14 , GPIO_PIN_RESET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_12 , GPIO_PIN_RESET );
    }else if( (string[0] == 'M') && (string[152] == 'N') ){
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_14 , GPIO_PIN_SET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_13 , GPIO_PIN_RESET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_12 , GPIO_PIN_RESET );
    }else{
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_12 , GPIO_PIN_SET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_13 , GPIO_PIN_RESET );
      HAL_GPIO_WritePin( GPIOD , GPIO_PIN_14 , GPIO_PIN_RESET );
    }
 HAL_UART_IRQHandler(&huart4);
}
开发者ID:mostafayasin,项目名称:MOTSL,代码行数:21,代码来源:main-RX-int-hal.c


示例8: USART1_IRQHandler

/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{

  trace_puts("Run into USART1_IRQHandler!");
  /* USER CODE BEGIN USART1_IRQn 0 */

  /* USER CODE END USART1_IRQn 0 */
  HAL_UART_IRQHandler(&huart1);
  /* USER CODE BEGIN USART1_IRQn 1 */

  /* USER CODE END USART1_IRQn 1 */
}
开发者ID:atmanic,项目名称:chassis_universal_platform,代码行数:15,代码来源:stm32f4xx_it.c


示例9: USART3_8_IRQHandler

void USART3_8_IRQHandler(void)
{
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART3)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART3_INDEX]);
  }
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART4)!= RESET)
  {
     HAL_UART_IRQHandler(&UartHandle[USART4_INDEX]);
  }
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART5)!= RESET)
  {
     HAL_UART_IRQHandler(&UartHandle[USART5_INDEX]);
  }
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART6)!= RESET)
  {
     HAL_UART_IRQHandler(&UartHandle[USART6_INDEX]);
  }
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART7)!= RESET)
  {
     HAL_UART_IRQHandler(&UartHandle[USART7_INDEX]);
  }
  if (__HAL_GET_PENDING_IT(HAL_ITLINE_USART8)!= RESET)
  {
     HAL_UART_IRQHandler(&UartHandle[USART8_INDEX]);
  }
}
开发者ID:jmoyerman,项目名称:stm32f0_cube,代码行数:27,代码来源:stm32f0xx_it.c


示例10: USART3_8_IRQHandler

/**
  * @brief  This function handles UART3_8 interrupt request.  
  * @param  None
  * @retval None
  * @Note   This function is redefined in "main.h" and related to DMA 
  *         used for USART data transmission     
  */  
void USART3_8_IRQHandler(void)
{
  uint32_t pendingIT = SYSCFG->IT_LINE_SR[USART3_8_IRQn];
  
  if((pendingIT & SYSCFG_ITLINE29_SR_USART3_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART3_INDEX]);
  }
  if((pendingIT & SYSCFG_ITLINE29_SR_USART4_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART4_INDEX]);
  }
  if((pendingIT & SYSCFG_ITLINE29_SR_USART5_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART5_INDEX]);
  }
  if((pendingIT & SYSCFG_ITLINE29_SR_USART6_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART6_INDEX]);
  }
  if((pendingIT & SYSCFG_ITLINE29_SR_USART7_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART7_INDEX]);
  }
  if((pendingIT & SYSCFG_ITLINE29_SR_USART8_GLB)!= RESET)
  {
    HAL_UART_IRQHandler(&UartHandle[USART8_INDEX]);
  }
}
开发者ID:GreyCardinalRus,项目名称:stm32-cube,代码行数:36,代码来源:stm32f0xx_it.c


示例11: USART3_8_IRQHandler

/**
* @brief This function handles USART3 to USART8 global interrupts / USART3 wake-up interrupt through EXTI line 28.
*/
void USART3_8_IRQHandler(void)
{
	portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
	
#if (HO01R1 || HO02R0 || HO01R2 || HO02R1 || PO01R0 || PO02R0 || HO01R3 || HO02R2)
	HAL_UART_IRQHandler(&huart3);
#endif
#if (HO01R1 || HO02R0 || HO01R2 || HO02R1 || PO01R0 || PO02R0 || HO01R3 || HO02R2)
	HAL_UART_IRQHandler(&huart4);
#endif
#if (HO01R1 || HO02R0 || HO01R2 || HO02R1 || PO01R0 || PO02R0)
	HAL_UART_IRQHandler(&huart5);
#endif
#if (HO01R2 || HO02R1)
	HAL_UART_IRQHandler(&huart6);
#endif
#if (HO01R1 || HO02R0 || HO01R3 || HO02R2)
	HAL_UART_IRQHandler(&huart7);
#endif
#if (HO01R1 || HO02R0 || PO01R0 || PO02R0 || HO01R3 || HO02R2)
	HAL_UART_IRQHandler(&huart8);
#endif
	
	/* If lHigherPriorityTaskWoken is now equal to pdTRUE, then a context
	switch should be performed before the interrupt exists.  That ensures the
	unblocked (higher priority) task is returned to immediately. */
	portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
	
}
开发者ID:OUWECAD,项目名称:MOWE,代码行数:32,代码来源:stm32f0xx_it.c


示例12: USART1_IRQHandler

/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{
  /* USER CODE BEGIN USART1_IRQn 0 */

  /* USER CODE END USART1_IRQn 0 */
  HAL_UART_IRQHandler(&huart1);
  /* USER CODE BEGIN USART1_IRQn 1 */
HAL_GPIO_WritePin( GPIOG, GPIO_PIN_13, GPIO_PIN_SET);
	for(uint32_t i=0;i<100000;i++){}
HAL_GPIO_WritePin( GPIOG, GPIO_PIN_13, GPIO_PIN_RESET);
//	 HAL_UART_Receive_IT(&huart1, receiveBuffer, 1);
  /* USER CODE END USART1_IRQn 1 */
}
开发者ID:ilyaseeyousoon,项目名称:stm32f429_spi_slave_hal,代码行数:16,代码来源:stm32f4xx_it.c


示例13: USART1_IRQHandler

/**
  * @brief  This function handles UART interrupt request.
  * @param  None
  * @retval None
  */
void USART1_IRQHandler(void)
{
  /* Check if it's a RX interrupt */
  uint32_t tmp_flag = 0, tmp_it_source = 0;
  tmp_flag = __HAL_UART_GET_FLAG(&UART_Handle, UART_FLAG_RXNE);
  tmp_it_source = __HAL_UART_GET_IT_SOURCE(&UART_Handle, UART_IT_RXNE);
  if ((tmp_flag != RESET) && (tmp_it_source != RESET))
  {
    UART1_DataReceivedHandler();
  }
  /* Otherwise call the HAL IRQ handler */
  else
    HAL_UART_IRQHandler(&UART_Handle);
}
开发者ID:hampussandberg,项目名称:HexConnect,代码行数:19,代码来源:stm32f1xx_it.c


示例14: USART2_IRQHandler

/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
  /* USER CODE BEGIN USART2_IRQn 0 */
#if 1
    if(__HAL_UART_GET_FLAG(&huart2, UART_FLAG_IDLE) && __HAL_UART_GET_IT_SOURCE(&huart2, UART_IT_IDLE))
    {
        __HAL_UART_CLEAR_IDLEFLAG(&huart2);
        ESP8266_RecvCallback(RECV_IDLE);
    }
#else
  /* USER CODE END USART2_IRQn 0 */
  HAL_UART_IRQHandler(&huart2);
  /* USER CODE BEGIN USART2_IRQn 1 */
#endif
  /* USER CODE END USART2_IRQn 1 */
}
开发者ID:JalonWong,项目名称:Mini-IoT,代码行数:19,代码来源:stm32f1xx_it.c


示例15: USART1_IRQHandler

/**
* @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25.
*/
void USART1_IRQHandler(void)
{
  /* USER CODE BEGIN USART1_IRQn 0 */
  if(__HAL_UART_GET_IT_SOURCE(&huart1, UART_IT_RXNE)!= RESET) 
	{
		prvvUARTRxISR();
	}
	if(__HAL_UART_GET_IT_SOURCE(&huart1, UART_IT_TXE)!= RESET) 
	{
		prvvUARTTxReadyISR();
	}
  /* USER CODE END USART1_IRQn 0 */
  HAL_UART_IRQHandler(&huart1);
  /* USER CODE BEGIN USART1_IRQn 1 */

  /* USER CODE END USART1_IRQn 1 */
}
开发者ID:RunnerL,项目名称:Farsight_SXT,代码行数:20,代码来源:stm32f0xx_it.c


示例16: USART1_IRQHandler

//void TIM4_IRQHandler( void )
//void I2C1_EV_IRQHandler( void )
//void I2C1_ER_IRQHandler( void )
//void I2C2_EV_IRQHandler( void )
//void I2C2_ER_IRQHandler( void )
//void SPI1_IRQHandler( void )
//void SPI2_IRQHandler( void )
void USART1_IRQHandler( void )
{
#if defined(KS_HW_UART_HAL_LIBRARY)
  HAL_UART_IRQHandler(hSerial.handle);

#else
  if (__HAL_UART_GET_IT_SOURCE(hSerial.handle, UART_IT_TXE) != RESET) {
    __HAL_UART_GET_IT_SOURCE(hSerial.handle, UART_IT_TXE);
    HAL_UART_TxCpltCallback(hSerial.handle);
  }
  if (__HAL_UART_GET_IT_SOURCE(hSerial.handle, UART_IT_RXNE) != RESET) {
    __HAL_UART_GET_IT_SOURCE(hSerial.handle, UART_IT_RXNE);
    HAL_UART_RxCpltCallback(hSerial.handle);
  }

#endif
}
开发者ID:QCopter,项目名称:QCopterFlightControl,代码行数:24,代码来源:stm32f4xx_it.c


示例17: USART1_IRQHandler

/**
* @brief This function handles USART1 global interrupt.
*/
void USART1_IRQHandler(void)
{
  /* USER CODE BEGIN USART1_IRQn 0 */
	uint32_t tmp1, tmp2;
  tmp1 = __HAL_UART_GET_FLAG(&huart1, UART_FLAG_IDLE);
  tmp2 = __HAL_UART_GET_IT_SOURCE(&huart1, UART_IT_IDLE);

  if((tmp1 != RESET) && (tmp2 != RESET))
  {
		__HAL_UART_DISABLE_IT(&huart1, UART_IT_IDLE);
    __HAL_UART_CLEAR_IDLEFLAG(&huart1);
    My_HAL_UART_IdleCallback(&huart1);
  }

  /* USER CODE END USART1_IRQn 0 */
  HAL_UART_IRQHandler(&huart1);
  /* USER CODE BEGIN USART1_IRQn 1 */

  /* USER CODE END USART1_IRQn 1 */
}
开发者ID:35408EF66CCE4377B1E3C2495CA1C18A,项目名称:stm32f407_oled,代码行数:23,代码来源:stm32f4xx_it.c


示例18: USART2_IRQHandler

/**
* @brief This function handles USART2 global interrupt.
*/
void USART2_IRQHandler(void)
{
  /* USER CODE BEGIN USART2_IRQn 0 */
	uint32_t tmp_flag = 0;
	
	tmp_flag = __HAL_UART_GET_FLAG(&huart2,UART_FLAG_IDLE);
	if((tmp_flag != RESET))
  {
		__HAL_UART_CLEAR_IDLEFLAG(&huart2);
		huart2.Instance->ISR;           //读取寄存器,清理相应标志位
		huart2.Instance->TDR; 			     //读取寄存器,清理相应标志位
		HAL_UART_DMAStop(&huart2);
		dma_state = HAL_UART_Receive_DMA(&huart2,uart2_recv_buf,BUFFER_SIZE);
	}
  /* USER CODE END USART2_IRQn 0 */
  HAL_UART_IRQHandler(&huart2);
  /* USER CODE BEGIN USART2_IRQn 1 */

  /* USER CODE END USART2_IRQn 1 */
}
开发者ID:RunnerL,项目名称:Farsight_SXT,代码行数:23,代码来源:stm32f0xx_it.c


示例19: serial_irq_handler_asynch

/**
 * The asynchronous TX and RX handler.
 *
 * @param obj The serial object
 * @return Returns event flags if a TX/RX transfer termination condition was met or 0 otherwise
 */
int serial_irq_handler_asynch(serial_t *obj)
{
    struct serial_s *obj_s = SERIAL_S(obj);
    UART_HandleTypeDef *huart = &uart_handlers[obj_s->index];
    
    volatile int return_event = 0;
    uint8_t *buf = (uint8_t*)(obj->rx_buff.buffer);
    uint8_t i = 0;
    
    // TX PART:
    if (__HAL_UART_GET_FLAG(huart, UART_FLAG_TC) != RESET) {
        if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_TC) != RESET) {
            // Return event SERIAL_EVENT_TX_COMPLETE if requested
            if ((obj_s->events & SERIAL_EVENT_TX_COMPLETE ) != 0) {
                return_event |= (SERIAL_EVENT_TX_COMPLETE & obj_s->events);
            }
        }
    }
    
    // Handle error events
    if (__HAL_UART_GET_FLAG(huart, UART_FLAG_PE) != RESET) {
        if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) {
            return_event |= (SERIAL_EVENT_RX_PARITY_ERROR & obj_s->events);
        }
    }
    
    if (__HAL_UART_GET_FLAG(huart, UART_FLAG_FE) != RESET) {
        if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) {
            return_event |= (SERIAL_EVENT_RX_FRAMING_ERROR & obj_s->events);
        }
    }
    
    if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) {
        if (__HAL_UART_GET_IT_SOURCE(huart, USART_IT_ERR) != RESET) {
            return_event |= (SERIAL_EVENT_RX_OVERRUN_ERROR & obj_s->events);
        }
    }
    
    HAL_UART_IRQHandler(huart);
    
    // Abort if an error occurs
    if (return_event & SERIAL_EVENT_RX_PARITY_ERROR ||
            return_event & SERIAL_EVENT_RX_FRAMING_ERROR ||
            return_event & SERIAL_EVENT_RX_OVERRUN_ERROR) {
        return return_event;
    }
    
    //RX PART
    if (huart->RxXferSize != 0) {
        obj->rx_buff.pos = huart->RxXferSize - huart->RxXferCount;
    }
    if ((huart->RxXferCount == 0) && (obj->rx_buff.pos >= (obj->rx_buff.length - 1))) {
        return_event |= (SERIAL_EVENT_RX_COMPLETE & obj_s->events);
    }
    
    // Check if char_match is present
    if (obj_s->events & SERIAL_EVENT_RX_CHARACTER_MATCH) {
        if (buf != NULL) {
            for (i = 0; i < obj->rx_buff.pos; i++) {
                if (buf[i] == obj->char_match) {
                    obj->rx_buff.pos = i;
                    return_event |= (SERIAL_EVENT_RX_CHARACTER_MATCH & obj_s->events);
                    serial_rx_abort_asynch(obj);
                    break;
                }
            }
        }
    }
    
    return return_event;  
}
开发者ID:AlessandroA,项目名称:mbed,代码行数:77,代码来源:serial_api.c


示例20: HAL_UART_IRQHandler

void Uart::IRQ()
{

	 HAL_UART_IRQHandler(& m_huart);
	//__HAL_UART_CLEAR_FLAG(& m_huart,UART_FLAG_RXNE);
}
开发者ID:ViaudJV,项目名称:stm32bot,代码行数:6,代码来源:Uart.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HAL_UART_Init函数代码示例发布时间:2022-05-30
下一篇:
C++ HAL_UART_DeInit函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap