fixed UDP socket recv and send bug and support I2c Bus registration
This commit is contained in:
@@ -70,8 +70,8 @@ void lwip_setip_thread(int argc, char *argv[])
|
||||
pthread_t th_id;
|
||||
pthread_attr_t attr;
|
||||
|
||||
attr.schedparam.sched_priority = 15;
|
||||
attr.stacksize = 4096;
|
||||
attr.schedparam.sched_priority = LWIP_DEMO_TASK_PRIO;
|
||||
attr.stacksize = LWIP_TASK_STACK_SIZE;
|
||||
|
||||
if(argc >= 4)
|
||||
{
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "pin_mux.h"
|
||||
#include "clock_config.h"
|
||||
|
||||
#include <transform.h>
|
||||
#include <sys_arch.h>
|
||||
#include "connect_ethernet.h"
|
||||
|
||||
@@ -61,14 +60,6 @@ ip4_addr_t ping_addr;
|
||||
* Code
|
||||
******************************************************************************/
|
||||
|
||||
static void *lwip_ping_test(void *param)
|
||||
{
|
||||
IP4_ADDR(&ping_addr, lwip_gwaddr[0], lwip_gwaddr[1], lwip_gwaddr[2], lwip_gwaddr[3]);
|
||||
ETH_BSP_Config();
|
||||
lwip_config_net(lwip_ipaddr, lwip_netmask, lwip_gwaddr);
|
||||
ping_init(&ping_addr);
|
||||
}
|
||||
|
||||
void lwip_ping_thread(int argc, char *argv[])
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2021-05-29
|
||||
*/
|
||||
#include <transform.h>
|
||||
#include <xiuos.h>
|
||||
#include "board.h"
|
||||
#include "sys_arch.h"
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2021-05-29
|
||||
*/
|
||||
#include <transform.h>
|
||||
#include <xiuos.h>
|
||||
#include "board.h"
|
||||
#include "sys_arch.h"
|
||||
@@ -95,8 +94,7 @@ __exit:
|
||||
void *lwip_udp_send_run(int argc, char *argv[])
|
||||
{
|
||||
int result = 0;
|
||||
pthread_t th_id;
|
||||
pthread_attr_t attr;
|
||||
sys_thread_t th_id;
|
||||
|
||||
memset(udp_send_msg, 0, sizeof(udp_send_msg));
|
||||
|
||||
@@ -118,7 +116,7 @@ void *lwip_udp_send_run(int argc, char *argv[])
|
||||
|
||||
ETH_BSP_Config();
|
||||
lwip_config_tcp(lwip_ipaddr, lwip_netmask, lwip_gwaddr);
|
||||
sys_thread_new("udp socket send", lwip_udp_send, NULL, 4096, 25);
|
||||
sys_thread_new("udp socket send", lwip_udp_send, NULL, LWIP_TASK_STACK_SIZE, LWIP_DEMO_TASK_PRIO);
|
||||
}
|
||||
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(3),
|
||||
|
||||
Reference in New Issue
Block a user