Altera_Forum
Honored Contributor
10 years agoNon-blocking fgets
Hi,
I'm interfacing MAX10 fpga development kit with matlab. The matlab sends command to the .c file which in turns request data from the fpga development kit. I'm able to acquire data continuously but want to do a modification in my code that when matlab send a "STOP" command, the .c file should suspend the data acquisition process from the board. I'm using fgets but as it's a non-blocking function, hence I'm getting stuck in the loop as fgets is waiting for a command. How can I avoid this ? Can anyone please help me resolve this issue ? Thanks,