Snapshot build no longer works with __putchar

Comments

5 comments

  • Avatar
    Michael Johnson

    The declaration is correct

    struct __printf_tag;
    int __putchar(int, struct __printf_tag *);

    but it was never declared in previous releases.

    The declaration was put in to remove an undeclared warning....

    0
    Comment actions Permalink
  • Avatar
    Greg Smith

    OK... is there any doc on what we are supposed to do to make use of it. I can declare a matching function, but what are the arguments and return value.

    Greg

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    You can just put it in the prototype (and not use it) e.g.

    int __putchar(int x, struct __printf_tag *t)

    {
    return debug_putchar(x);
    }

    0
    Comment actions Permalink
  • Avatar
    Greg Smith

    Thanks.

    Is there a magic number I should return to say that I have used the extra information (and that I should avoid to simulate the old usage)?

    For development it is fine to comment out my __putchar and use the debug terminal, but for real use I need to redirect it.

    It would be easy for me to use the extra information as my (as it happens serial) output has routines that take a pointer and a size.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Greg,

    There are some words on this

    Customizing Putchar

    in the manual - not sure if this is any use?

    Regards

    Michael

    0
    Comment actions Permalink

Please sign in to leave a comment.