This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Custom getchar

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

Parents
  • 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);

    in "stdio.h". Try defining it as a signed char and try it again.

Reply
  • 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);

    in "stdio.h". Try defining it as a signed char and try it again.

Children