This commit is contained in:
Bernard Xiong 2015-11-09 15:25:57 +08:00
commit dedc22379a
2 changed files with 259 additions and 224 deletions

View File

@ -37,7 +37,7 @@
#define LSR_RXFE 0x80 #define LSR_RXFE 0x80
/** /**
* @addtogroup LPC11xx * @addtogroup LPC176x
*/ */
/*@{*/ /*@{*/
@ -90,6 +90,10 @@ void UART0_IRQHandler(void)
uart->parent.rx_indicate(&uart->parent, length); uart->parent.rx_indicate(&uart->parent, length);
} }
} }
else if (iir == IIR_RLS)
{
iir = LPC_UART->LSR; //oe pe fe oe read for clear interrupt
}
return; return;
} }

View File

@ -282,6 +282,37 @@ int cmd_ifconfig(int argc, char **argv)
} }
FINSH_FUNCTION_EXPORT_ALIAS(cmd_ifconfig, __cmd_ifconfig, list the information of network interfaces); FINSH_FUNCTION_EXPORT_ALIAS(cmd_ifconfig, __cmd_ifconfig, list the information of network interfaces);
#ifdef RT_LWIP_DNS
#include <lwip/api.h>
#include <lwip/dns.h>
int cmd_dns(int argc, char **argv)
{
extern void set_dns(char* dns_server);
if (argc == 1)
{
int index;
struct ip_addr ip_addr;
for(index=0; index<DNS_MAX_SERVERS; index++)
{
ip_addr = dns_getserver(index);
rt_kprintf("dns server #%d: %s\n", index, ipaddr_ntoa(&(ip_addr)));
}
}
else if (argc == 2)
{
rt_kprintf("dns : %s\n", argv[1]);
set_dns(argv[1]);
}
else
{
rt_kprintf("bad parameter! e.g: dns 114.114.114.114\n");
}
return 0;
}
FINSH_FUNCTION_EXPORT_ALIAS(cmd_dns, __cmd_dns, list the information of dns);
#endif
#ifdef RT_LWIP_TCP #ifdef RT_LWIP_TCP
int cmd_netstat(int argc, char **argv) int cmd_netstat(int argc, char **argv)
{ {