This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

mysterious behavior in serial ports


So per Andrews comment I found that yes, I can force /dev/tty0 to be stdin/out (cool) and as long as I talk to Redboot on COM1 first it becomes /dev/ttydiag so no worries about stalling the system by polling the serial port.

However, I have a simple loop that goes:
    while (1) {
	char buf[200];

	printf("Enter some text : ");
	gets(buf);
	printf("'%s'\n", buf);
    }

Basically get some text and print it out. The weird behavior is that the text doesn't show up, pause .... pop out comes the Enter ..text prompt. Start typing and see nothing then suddenly poof! all caught up and following my keystrokes in real time.

So I assume this is some sort of high water/ low water buffering behavior. Can I turn it off so that text comes out right away and echoes right away?

--Chuck


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]