Browse Source

fix bug

external_Interrupt
tianjialong 2 years ago
parent
commit
6d08e434e9
  1. 39
      MDK-ARM/LWIP.uvguix.29643
  2. 8
      MDK-ARM/LWIP.uvoptx
  3. 13
      usersrc/atcmd.c

39
MDK-ARM/LWIP.uvguix.29643
File diff suppressed because it is too large
View File

8
MDK-ARM/LWIP.uvoptx

@ -157,9 +157,9 @@
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>72</LineNumber>
<LineNumber>80</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134233266</Address>
<Address>134233272</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
@ -168,7 +168,7 @@
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\usersrc\atcmd.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\LWIP\../usersrc/atcmd.c\72</Expression>
<Expression>\\LWIP\../usersrc/atcmd.c\80</Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
@ -185,7 +185,7 @@
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>int_addr-&gt;addr</ItemText>
<ItemText>len</ItemText>
</Ww>
</WatchWindow1>
<Tracepoint>

13
usersrc/atcmd.c

@ -66,21 +66,22 @@ AT_STATUS at_cmd_ip(unsigned char *p, unsigned char len)
{
ip4_addr_t int_addr;
char *ip_address;
ip_address = (char *)malloc(len);
memcpy(ip_address, p, len);
printf("ip_address:%s\r\n", ip_address);
inet_aton(ip_address, &int_addr);
printf("int_addr:%d\r\n", int_addr.addr);
if (*p == '?')
{
printf("config ip address:%s\r\n", inet_ntoa(config_get()->ip));
}
else
{
ip_address = (char *)malloc(len+1);
strncpy(ip_address, (const char *)p, len);
printf("ip_address:%s\r\n", ip_address);
inet_aton(ip_address, &int_addr);
printf("int_addr:%d\r\n", int_addr.addr);
// printf("ip address:%s\r\n", p);
printf("AT+OK\r\n");
}
free(ip_address);
}
return AT_SUCCESS;
}

Loading…
Cancel
Save