On Fri, Sep 5, 2025 at 5:57 PM Kory Maincent <[email protected]> wrote: >
> Indeed inverting the condition will change the behavior, but is it really the > issue here. > With the current condition test, serial_tstc() is called then if it return > something not null, serial_getc() will read one character and compare it to > 'c'. > > According to documentation: > serial_tstc() - Test if data is available on currently selected serial port > serial_getc() - Read character from currently selected serial port > > I think the current order is correct, we should test available data before > reading it. > Your issue may be somewhere else. I think you are right. I have tested it again without this patch and spammed 'c' like a lot, It works. ( One has to be really quick to spam 'c') Somehow, In previous iterations this was not observed, repeatedly. I think this patch is not required. Thankyou Kory for your time. -- Thanks Sidharth Seela

