Lines Matching refs:gd
40 if (console == -1 || (gd->flags & GD_FLG_DEVINIT) == 0) in on_console()
82 gd->flags |= GD_FLG_SILENT; in on_silent()
84 gd->flags &= ~GD_FLG_SILENT; in on_silent()
134 gd->jt->getc = getc; in console_setfile()
135 gd->jt->tstc = tstc; in console_setfile()
138 gd->jt->putc = putc; in console_setfile()
139 gd->jt->puts = puts; in console_setfile()
140 gd->jt->printf = printf; in console_setfile()
394 if (gd->flags & GD_FLG_DISABLE_CONSOLE) in getc()
398 if (!gd->have_console) in getc()
402 if (gd->console_in.start) { in getc()
405 ch = membuff_getbyte(&gd->console_in); in getc()
410 if (gd->flags & GD_FLG_DEVINIT) { in getc()
422 if (gd->flags & GD_FLG_DISABLE_CONSOLE) in tstc()
426 if (!gd->have_console) in tstc()
429 if (gd->console_in.start) { in tstc()
430 if (membuff_peekbyte(&gd->console_in) != -1) in tstc()
434 if (gd->flags & GD_FLG_DEVINIT) { in tstc()
455 buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c; in pre_console_putc()
473 if (gd->flags & GD_FLG_SILENT) in print_pre_console_buffer()
478 if (gd->precon_buf_idx > CONFIG_PRE_CON_BUF_SZ) in print_pre_console_buffer()
479 in = gd->precon_buf_idx - CONFIG_PRE_CON_BUF_SZ; in print_pre_console_buffer()
481 while (in < gd->precon_buf_idx) in print_pre_console_buffer()
506 if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { in putc()
513 if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { in putc()
518 if (!gd) in putc()
521 if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start) in putc()
522 membuff_putbyte(&gd->console_out, c); in putc()
525 if (gd->flags & GD_FLG_SILENT) { in putc()
526 if (!(gd->flags & GD_FLG_DEVINIT)) in putc()
533 if (gd->flags & GD_FLG_DISABLE_CONSOLE) in putc()
537 if (!gd->have_console) in putc()
540 if (gd->flags & GD_FLG_DEVINIT) { in putc()
554 if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { in puts()
560 if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { in puts()
569 if (!gd) in puts()
572 if ((gd->flags & GD_FLG_RECORD) && gd->console_out.start) in puts()
573 membuff_put(&gd->console_out, s, strlen(s)); in puts()
576 if (gd->flags & GD_FLG_SILENT) { in puts()
577 if (!(gd->flags & GD_FLG_DEVINIT)) in puts()
584 if (gd->flags & GD_FLG_DISABLE_CONSOLE) in puts()
588 if (!gd->have_console) in puts()
591 if (gd->flags & GD_FLG_DEVINIT) { in puts()
606 ret = membuff_new(&gd->console_out, CONFIG_CONSOLE_RECORD_OUT_SIZE); in console_record_init()
609 ret = membuff_new(&gd->console_in, CONFIG_CONSOLE_RECORD_IN_SIZE); in console_record_init()
616 membuff_purge(&gd->console_out); in console_record_reset()
617 membuff_purge(&gd->console_in); in console_record_reset()
623 gd->flags |= GD_FLG_RECORD; in console_record_reset_enable()
632 if (!ctrlc_disabled && gd->have_console) { in ctrlc()
745 gd->flags |= GD_FLG_SILENT; in console_update_silent()
747 unsigned long flags = gd->flags; in console_update_silent()
749 gd->flags &= ~GD_FLG_SILENT; in console_update_silent()
774 gd->have_console = 1; in console_init_f()
831 gd->jt->getc = serial_getc; in console_init_r()
832 gd->jt->tstc = serial_tstc; in console_init_r()
833 gd->jt->putc = serial_putc; in console_init_r()
834 gd->jt->puts = serial_puts; in console_init_r()
835 gd->jt->printf = serial_printf; in console_init_r()
899 gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */ in console_init_r()
936 if (!(gd->flags & GD_FLG_SILENT)) in console_init_r()
982 gd->flags |= GD_FLG_DEVINIT; /* device initialization completed */ in console_init_r()