We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Is there a way to prevent getchar from echoing the input characters? I tried to write my own implementation of getchar, but the linker doesn't seem to let me do that. - Mike
I've taken the Traffic example. If I put "char getchar(void){return 0;}" in Serial.c, at link stage I get *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS SYMBOL: getchar MODULE: C:\KEIL\C166\LIB\C167S.LIB (GETCHAR) *** ERROR L118: REFERENCE MADE TO ERRONEOUS EXTERNAL SYMBOL: getchar MODULE: C:\KEIL\C166\LIB\C167S.LIB (SCANF) ADDRESS: 07A6H
I've taken the Traffic example. If I put "char getchar(void){return 0;}" in Serial.c, at link stage I get *** ERROR L104: MULTIPLE PUBLIC DEFINITIONS I believe the reason for the error is that the function is defined as:
extern signed char getchar (void);
Actually, redefining getchar and ungetchar at the same time did the trick. I should have done that in the first place, so stupid of me. Thanks to everyone! - Mike