/* Put characters to standard output from interrupt context or with the system lock taken.  */
static void fprintf_putc_isr(char c, void *arg_p)
/* Put characters to standard output from interrupt context or with the system lock taken.  */
static void fprintf_putc_isr(char c, void *arg_p)
{
    struct buffered_output_t *output_p = arg_p;
    output_p->buffer[output_p->pos++] = c;
    output_p->size++;
    if (output_p->pos == membersof(output_p->buffer)) {
        chan_write_isr(output_p->chan_p, output_p->buffer, output_p->pos);
        output_p->pos = 0;
    }
}