forked from xuos/xiuos
1、fix uart dev_recv_callback not init error;2、fix app_test compile error.
This commit is contained in:
parent
8a8a513cf1
commit
3378579d9e
|
@ -281,6 +281,7 @@ menu "test app"
|
|||
menuconfig USER_TEST_MQTTCLIENT
|
||||
bool "Config test mqtt client"
|
||||
default n
|
||||
select LIB_USING_CJSON
|
||||
|
||||
menuconfig USER_TEST_FTPCLIENT
|
||||
bool "Config test ftp client"
|
||||
|
|
|
@ -150,7 +150,9 @@ ifeq ($(CONFIG_ADD_XIZI_FEATURES),y)
|
|||
endif
|
||||
|
||||
ifeq ($(CONFIG_USER_TEST_FTPCLIENT_RISCV),y)
|
||||
SRC_FILES += test_ftpclient_riscv/test_ftpclient_riscv.c
|
||||
ifeq ($(CONFIG_BSP_USING_W5500),y)
|
||||
SRC_FILES += test_ftpclient_riscv/test_ftpclient_riscv.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_USER_TEST_LORA_P2P),y)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <transform.h>
|
||||
#ifdef ADD_XIZI_FEATURES
|
||||
|
||||
#ifdef BSP_USING_W5500
|
||||
#include <socket.h>
|
||||
|
||||
#define BUFF_SIZE 128
|
||||
|
@ -189,6 +190,6 @@ PRIV_SHELL_CMD_FUNCTION(TestSocketAsClient, a w5500 client-ip-port-msg test samp
|
|||
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -98,6 +98,7 @@ void TestLora(int argc, char *argv[])
|
|||
uart_cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
uart_cfg.serial_timeout = 1000;
|
||||
uart_cfg.is_ext_uart = 0;
|
||||
uart_cfg.dev_recv_callback = NULL;
|
||||
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
ioctl_cfg.args = (void *)&uart_cfg;
|
||||
|
|
|
@ -62,6 +62,7 @@ static struct SerialDataCfg serial_cfg =
|
|||
.serial_buffer_size = SERIAL_RB_BUFSZ,
|
||||
.serial_timeout = E220_DAFAULT_SERIAL_TIMEOUT, // 串口超时配置
|
||||
.is_ext_uart = 0,
|
||||
.dev_recv_callback = NULL,
|
||||
};
|
||||
|
||||
enum LoraMode current_mode = -1; // 当前模块处于什么模式
|
||||
|
|
|
@ -138,6 +138,7 @@ void Test485(void)
|
|||
uart_cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
uart_cfg.serial_timeout = -1;
|
||||
uart_cfg.is_ext_uart = 0;
|
||||
uart_cfg.dev_recv_callback = NULL;
|
||||
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
ioctl_cfg.args = (void *)&uart_cfg;
|
||||
|
|
|
@ -70,6 +70,7 @@ void Test485(void)
|
|||
uart_cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
uart_cfg.serial_timeout = 1000;
|
||||
uart_cfg.is_ext_uart = 0;
|
||||
uart_cfg.dev_recv_callback = NULL;
|
||||
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
ioctl_cfg.args = (void *)&uart_cfg;
|
||||
|
|
|
@ -68,6 +68,7 @@ void TestUart(int argc, char* argv[])
|
|||
uart_cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
uart_cfg.serial_timeout = -1;
|
||||
uart_cfg.is_ext_uart = 0;
|
||||
uart_cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -175,6 +175,7 @@ static int Ec200tIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.ext_uart_no = ADAPTER_EC200T_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
serial_cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -268,6 +268,7 @@ static int Hc08Open(struct Adapter *adapter)
|
|||
serial_cfg.ext_uart_no = ADAPTER_HC08_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
serial_cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
@ -326,6 +327,7 @@ static int Hc08Ioctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.ext_uart_no = ADAPTER_HC08_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
serial_cfg.dev_recv_callback = NULL;
|
||||
|
||||
serial_cfg.serial_timeout = -1;
|
||||
|
||||
|
|
|
@ -407,6 +407,7 @@ static int Hfa21EthernetIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.ext_uart_no = ADAPTER_HFA21_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
serial_cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -290,6 +290,7 @@ static int E22Open(struct Adapter *adapter)
|
|||
//serial receive wait forever
|
||||
cfg.serial_timeout = -1;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -374,6 +374,7 @@ static int E220Open(struct Adapter *adapter)
|
|||
//serial receive wait forever
|
||||
cfg.serial_timeout = -1;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
@ -428,6 +429,7 @@ static int E220Open(struct Adapter *adapter)
|
|||
//serial receive wait forever
|
||||
cfg.serial_timeout = -1;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -63,6 +63,7 @@ static int BC28UartOpen(struct Adapter *adapter)
|
|||
cfg.ext_uart_no = ADAPTER_BC28_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -81,6 +81,7 @@ static int Esp07sUartOpen(struct Adapter *adapter)
|
|||
cfg.ext_uart_no = ADAPTER_ESP07S_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
@ -527,6 +528,7 @@ static int Esp07sWifiIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
cfg.is_ext_uart = 0;
|
||||
cfg.dev_recv_callback = NULL;
|
||||
#ifdef ADAPTER_ESP07S_DRIVER_EXT_PORT
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_ESP07S_DRIVER_EXT_PORT;
|
||||
|
|
|
@ -81,6 +81,7 @@ static int Esp8285UartOpen(struct Adapter *adapter)
|
|||
cfg.ext_uart_no = ADAPTER_ESP8285_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
@ -507,6 +508,7 @@ static int Esp8285WifiIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
cfg.is_ext_uart = 0;
|
||||
cfg.dev_recv_callback = NULL;
|
||||
#ifdef ADAPTER_ESP8285_DRIVER_EXT_PORT
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_ESP8285_DRIVER_EXT_PORT;
|
||||
|
|
|
@ -479,6 +479,7 @@ static int Hfa21WifiIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.ext_uart_no = ADAPTER_HFA21_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
serial_cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -160,6 +160,7 @@ static int E18UartOpen(struct Adapter *adapter)
|
|||
cfg.ext_uart_no = ADAPTER_E18_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -97,6 +97,7 @@ void Uart485Init(uint32_t baud_rate, uint8_t data_bits, uint8_t stop_bits, uint8
|
|||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.serial_timeout = 10000;
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
ioctl_cfg.args = &cfg;
|
||||
|
|
|
@ -58,6 +58,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_AS830_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -62,6 +62,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_G8S_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -62,6 +62,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_ZG09_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -59,6 +59,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -67,6 +67,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_IAQ10_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -77,6 +77,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_PS5308_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
result = PrivIoctl(sdev->fd, OPE_INT, &cfg);
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_TVOC10_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -107,6 +107,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_D124_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -60,6 +60,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_QS_FX_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
|
@ -59,6 +59,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.ext_uart_no = SENSOR_DEVICE_QS_FS_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
cfg.dev_recv_callback = NULL;
|
||||
|
||||
struct PrivIoctlCfg ioctl_cfg;
|
||||
ioctl_cfg.ioctl_driver_type = SERIAL_TYPE;
|
||||
|
|
Loading…
Reference in New Issue