刚开始看这个,求求帮忙回答
(1)如下程序函数strtoul() 的作用
(2)iInput == 1,iInput == 2 ,iInput == 3 的值 是从串口调试终端输入的吗
else
{
iInput = (int)strtoul(acCmdStore,0,10);
if(iInput == 1)
{
UART_PRINT("Run iperf command \"iperf.exe -s -i 1\" and press "
"Enter\n\r");
//
// Wait to receive a character over UART
//
MAP_UARTCharGet(CONSOLE);
UART_PRINT("Sending TCP packets…\n\r");
// Before proceeding, please make sure to have a server waiting on
// PORT_NUM
lRetVal = BsdTcpClient(g_uiPortNum);
}
else if(iInput == 2)
{
UART_PRINT("Press Enter and run iperf command \"iperf.exe -c "
"%d.%d.%d.%d -i 1 -t 100000\" \n\r",
SL_IPV4_BYTE(g_ulIpAddr,3),
SL_IPV4_BYTE(g_ulIpAddr,2),
SL_IPV4_BYTE(g_ulIpAddr,1),
SL_IPV4_BYTE(g_ulIpAddr,0));
//
// Wait to receive a character over UART
//
MAP_UARTCharGet(CONSOLE);
UART_PRINT("Receiving TCP packets…\n\r");
// After calling this function, you can start sending data to // CC3200 IP address on PORT_NUM
lRetVal = BsdTcpServer(g_uiPortNum);
}
else if(iInput == 3)
Ken Wang:
wewe
这个函数的意思是将字符串转换成无符号的长整形数。这个符号就是你在串口中断输入的操作选择。
谢谢