cancel
Showing results for 
Search instead for 
Did you mean: 

Keyboard Interrupt on UART receive

StanCosgrove
Associate III

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')

}

This discussion is locked. Please start a new topic to ask your question.
10 REPLIES 10

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.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.
CAN Jammer an open source CAN bus hacking tool
CANableV3 Open Source