Problem trying to implement a putchar function

Comments

1 comment

  • Avatar
    Dr Danish Ali

    Be careful that there are two underscores at the start of the name __putchar()

    Another point is that __putchar should return an int, so in a header file that you use the prototype would be:

    int __putchar(int c);

    Then in ONE .c file that you link into your project, have the definition

    int __putchar(int c) {
        /* whatever you need to do to send the character c to the MSP430 uart */
        return c;
    }

     

    0
    Comment actions Permalink

Please sign in to leave a comment.