Ejemplo n.º 1
0
int printf(const char *fmt, ...)
{
    // We're supposed to return the number of chars printed, but we might not
    // have that information (if we only use the p_syscall method), so in that
    // case we just return 0 (indicating success).
    int chars_printed = 0;

    if (printf_config.screen_output) {
        // This invokes the built-in printf function exported by NETXFER on the Evo T30.
        // The first two arguments mean "printf", since p_syscall also provides
        // other functions.  NOTE: If you are porting this code to another
        // platform, you will probably need to disable this call.
        (*p_syscall)(1, 1, fmt, (&fmt)+1, NULL);
    }

    if (printf_config.serial_output) {
        // Output to the serial port.
        chars_printed = general_printf(&serial_gprintf_callback, NULL, fmt, (const int *)(&fmt + 1));
    }

    return chars_printed;
}
Ejemplo n.º 2
0
Archivo: util.c Proyecto: ppenzin/House
int sprintf(char *s, char const *control, ...)
{
  int n = general_printf(fill_string, &s, control, (int *)(&control+1));
  *s = 0;
  return n;
}
Ejemplo n.º 3
0
Archivo: util.c Proyecto: ppenzin/House
void vfprintf(void * dummy, char const * fmt, void * ap)
{
  (void) general_printf(kprintf_helper, NULL, fmt, ap);
}
Ejemplo n.º 4
0
Archivo: util.c Proyecto: ppenzin/House
/* RTS-DEBUG */
void fprintf(void * dummy, char const * fmt, ...)
{
  (void) general_printf(kprintf_helper, NULL, fmt, (int *)(&fmt + 1));
}