Esempio n. 1
0
void up_serialinit(void)
{
#ifdef CONSOLE_DEV
  (void)uart_register("/dev/console", &CONSOLE_DEV);
#endif
#ifdef TTYS0_DEV
  (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
#endif
#ifdef TTYS1_DEV
  (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
#endif
}
Esempio n. 2
0
void up_serialinit(void)
{
  /* Register the console */

#ifdef HAVE_SERIAL_CONSOLE
  (void)uart_register("/dev/console", &g_usart1port);
#endif

  /* Register all USARTs */

  (void)uart_register("/dev/ttyS0", &g_usart1port);
}
Esempio n. 3
0
void up_serialinit(void)
{
  /* Register the console */

#ifdef HAVE_SERIAL_CONSOLE
  (void)uart_register("/dev/console", &CONSOLE_DEV);
#endif

  /* Register all USARTs */

  (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
#ifdef TTYS1_DEV
  (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
#endif
}
Esempio n. 4
0
void up_serialinit(void)
{
    /* Disable all UART interrupts */

    (void)z8_disableuartirq(&TTYS0_DEV);
    (void)z8_disableuartirq(&TTYS1_DEV);

    /* Initialize the console for early use */
    CONSOLE_DEV.isconsole = true;
    z8_setup(&CONSOLE_DEV);

    /* Reigster console and tty devices */

    (void)uart_register("/dev/console", &CONSOLE_DEV);
    (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
    (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
}
Esempio n. 5
0
void up_serialinit(void)
{
  uint8_t regval;

  /* Make sure that all UART interrupts are disabled */
#warning "Missing logic"

  /* Configure for usage of [E]SCC channels */

#ifdef CONFIG_Z180_SCC
#  warning "Missing logic"
#endif

#ifdef CONFIG_Z180_ESCCA
#  warning "Missing logic"
#endif

#ifdef CONFIG_Z180_ESCCB
#  warning "Missing logic"
#endif

  /* If there is a console, then configure the console now */

#ifdef CONSOLE_DEV
  CONSOLE_DEV.isconsole = true;
  z180_setup(&CONSOLE_DEV);
#endif

  /* Register console and tty devices */

#ifdef CONSOLE_DEV
  (void)uart_register("/dev/console", &CONSOLE_DEV);
#endif
  (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
#ifdef TTYS1_DEV
  (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
#endif
}
Esempio n. 6
0
void board_init(void)
{
	clock_init();

	uart_init();	
	uart_register();
	rt_console_set_device("uart");

	led_init();

	timer_init();
	
	rt_hw_mmu_init();
}
Esempio n. 7
0
void up_serialinit(void)
{
  (void)uart_register("/dev/console", &g_uartport);
  (void)uart_register("/dev/ttyS0", &g_uartport);
}
Esempio n. 8
0
static int uart_init(void) {
	return uart_register(&stm32_uart0, &uart_defparams);
}
Esempio n. 9
0
void up_serialinit(void)
{
    (void)uart_register("/dev/console", &CONSOLE_DEV);
    (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
    (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
}
Esempio n. 10
0
void up_serialinit(void)
{
  uint8_t regval;

  /* Make sure that all UART interrupts are disabled */

  ez80_disableuartint(TTYS0_DEV.priv);
#ifdef TTYS1_DEV
  ez80_disableuartint(TTYS1_DEV.priv);
#endif

  /* Configure pins for usage of UARTs */

#ifdef CONFIG_EZ80_UART0
  /* Set Port D, pins 0 and 1 for their alternate function (Mode 7) to enable UART0 */

  regval  = inp(EZ80_PD_DDR);
  regval |= 3;
  outp(EZ80_PD_DDR, regval);

  regval  = inp(EZ80_PD_ALT1);
  regval &= ~3;
  outp(EZ80_PD_ALT1, regval);

  regval  = inp(EZ80_PD_ALT2);
  regval |= 3;
  outp(EZ80_PD_ALT2, regval);
#endif

#ifdef CONFIG_EZ80_UART1
  /* Set Port C, pins 0 and 1 for their alternate function (Mode 7) to enable UART1 */

  regval  = inp(EZ80_PC_DDR);
  regval |= 3;
  outp(EZ80_PC_DDR, regval);

  regval  = inp(EZ80_PC_ALT1);
  regval &= ~3;
  outp(EZ80_PC_ALT1, regval);

  regval  = inp(EZ80_PC_ALT2);
  regval |= 3;
  outp(EZ80_PC_ALT2, regval);
#endif

  /* If there is a console, then configure the console now */

#ifdef CONSOLE_DEV
  CONSOLE_DEV.isconsole = true;
  ez80_setup(&CONSOLE_DEV);
#endif

  /* Register console and tty devices */

#ifdef CONSOLE_DEV
  (void)uart_register("/dev/console", &CONSOLE_DEV);
#endif
  (void)uart_register("/dev/ttyS0", &TTYS0_DEV);
#ifdef TTYS1_DEV
  (void)uart_register("/dev/ttyS1", &TTYS1_DEV);
#endif
}