'Uart receive interrupt serial port terminal for stm32

I've been trying to implement a kind of emulator for my code from serial port terminal. I am sending the data from the terminal with uart receive interrupts and saving the data to an array but I have to enter a few data and save it.

I want my uart function to wait for enter key and then proceed to the next function for next data. I couldn't figure out how to implement it and I don't want to use putchar or fscanf. How can I develop my code to work this way? I can't use while loop or if statements because I am using interrupts.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source