Beispiel #1
0
static int get_uart(const char *arg)
{
	int uart = uart_id(arg);

	if (uart < 0)
		bb_error_msg_and_die("illegal UART type: %s", arg);

	return uart;
}
Beispiel #2
0
void pnx4008_uart_pm(struct uart_port *port,
		     unsigned int state, unsigned int oldstate)
{
	int i = uart_id(port);

	if (i == UART_UNKNOWN)
		return;

	(state) ? uart_switch_off(i) : uart_switch_on(i);
}
Beispiel #3
0
void main(int argc, char *argv[])
{
   int arg;

   if (argc==1) {
      printf("usage: UART [port]          - where port is 1 - 4\n");
      exit(1);
   }
   arg=atoi(argv[1]);
   if (port_exist(arg))
      printf("COM%d: %s UART detected\n",arg,uart_id(arg));
   else
      printf("Port does not exist!\n");
   exit(0);
}