Flushing data in fifo
Posted:
Hi,
I am dealing with the fifo where I need to flush the data. If I use the read function to empty the pipe, since I do not know how many bytes in the fifo, my program will stuck in read function and will never return.
I tried to open the device in non-blocking mode - but it not supported.
I tried to use poll and select but it's not detecting if there's a data in the fifo.
I looked at the fifo.c example in demoapps but the way it works is that it holds the information (different threads) on how many bytes are being sent/read/delete.
Is there any other way around that I can use to clear my data?.
Thanks,
John
I am dealing with the fifo where I need to flush the data. If I use the read function to empty the pipe, since I do not know how many bytes in the fifo, my program will stuck in read function and will never return.
I tried to open the device in non-blocking mode - but it not supported.
I tried to use poll and select but it's not detecting if there's a data in the fifo.
I looked at the fifo.c example in demoapps but the way it works is that it holds the information (different threads) on how many bytes are being sent/read/delete.
Is there any other way around that I can use to clear my data?.
Thanks,
John