Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张亚玄
/
STM32Test
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
739e197c
authored
2019-10-29 23:03:35 +0800
by
张亚玄
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix some uart
1 parent
9b517205
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
Core/Src/stm32f0xx_it.c
Core/Src/stm32f0xx_it.c
View file @
739e197
...
...
@@ -123,11 +123,25 @@ void TIM1_BRK_UP_TRG_COM_IRQHandler(void)
void
USART2_IRQHandler
(
void
)
{
/* USER CODE BEGIN USART2_IRQn 0 */
uint16_t
timeout
=
0
;
/* USER CODE END USART2_IRQn 0 */
HAL_UART_IRQHandler
(
&
huart2
);
/* USER CODE BEGIN USART2_IRQn 1 */
timeout
=
0
;
while
(
HAL_UART_GetState
(
&
huart2
)
!=
HAL_UART_STATE_READY
)
{
timeout
++
;
if
(
timeout
>
HAL_MAX_DELAY
)
break
;
}
timeout
=
0
;
while
(
HAL_UART_Receive_IT
(
&
huart2
,
(
uint8_t
*
)
aRxBuffer
,
RXBUFFERSIZE
)
!=
HAL_OK
)
{
timeout
++
;
if
(
timeout
>
HAL_MAX_DELAY
)
break
;
}
/* USER CODE END USART2_IRQn 1 */
}
...
...
Please
register
or
sign in
to post a comment