Ejemplo n.º 1
0
/* putchar/getchar for printk */
static void bsp_out_char(char c)
{
  if (dbg_uart == NULL) {
    /* Local debug buffer when UART driver has not registered */
    pre_printk_dbgbuf[pre_printk_pos++] = c;
    pre_printk_pos = pre_printk_pos & (sizeof(pre_printk_dbgbuf)-1);
    return;
  }

  apbuart_outbyte_polled(dbg_uart, c, 1, 1);
}
Ejemplo n.º 2
0
static void apbuart_write_polled(
  rtems_termios_device_context *base,
  const char *buf,
  size_t len
)
{
  struct apbuart_context *uart = (struct apbuart_context *) base;
  size_t nwrite = 0;

  while (nwrite < len) {
    apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
    nwrite++;
  }
}
Ejemplo n.º 3
0
static void write_polled(
	rtems_termios_device_context *base,
	const char *buf,
	size_t len
)
{
	struct apbuart_priv *uart = base_get_priv(base);
	int nwrite = 0;

	while (nwrite < len) {
		apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
		nwrite++;
	}
}
Ejemplo n.º 4
0
/*
 *  Console Termios Support Entry Points
 */
static ssize_t leon3_console_write_polled(
  int minor,
  const char *buf,
  size_t len
)
{
  struct apbuart_priv *uart = leon3_console_get_uart(minor);
  int nwrite = 0;

  while (nwrite < len) {
    apbuart_outbyte_polled(uart->regs, *buf++, 1, 0);
    nwrite++;
  }
  return nwrite;
}