2023-11-28 7:17 AM
Hi i m using 26 keyboard key to interrupt via UART received, should i coded the 26 interrupt in a single rxcplt callback function or a multiple callback function? Whats the best way? pls advise...
void HAL_UART_RxCpltCallback(UART....)
{
HAL_UART_Receive_IT(huart, &rx_data....)
if (rx_data == 'a')
....
if (rx_data == 'b')
...
if (rx_data == 'c')
}
2023-11-29 12:27 PM
I've updated the code to show how to check for each character, at least for abc. Just do the same for the rest of the alphabet.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.