How to use HAL_UART_Receive_IT to stop current function and execute Callback?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-04-24 5:02 PM
I am using a keyboard to read several commands using HAL_UART_Recieve().
For each command I perform a different function. There are 3 such commands corresponding to one function each.
Assuming 3 functions multiply(), divide(), add() which are called if I press 'M','D','�?' respectively.
I want to use the HAL_UART_Recieve_IT() such that when I am in the multiply() function, if I randomly press the keyboard, I enter a fourth function subtract() after which I return to the main().
My Callback function includes the subtract() function:
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart){
subtract();
}
I'm not sure where to place the HAL_UART_Receive_IT() function?
Labels:
- Labels:
-
UART-USART
This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0
