1、fix uart dev_recv_callback not init error;2、fix app_test compile error.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user