forked from xuos/xiuos
add is_ext_uart in serial_cfg for framework
This commit is contained in:
parent
22de65aa20
commit
8df0563e64
|
@ -167,6 +167,7 @@ static int Ec200tIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.serial_bit_order = STOP_BITS_1;
|
||||
serial_cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
#ifdef ADAPTER_EC200T_DRIVER_EXT_PORT
|
||||
serial_cfg.is_ext_uart = 1;
|
||||
serial_cfg.ext_uart_no = ADAPTER_EC200T_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -239,6 +239,7 @@ static int Hc08Open(struct Adapter *adapter)
|
|||
serial_cfg.serial_bit_order = STOP_BITS_1;
|
||||
serial_cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
#ifdef ADAPTER_HC08_DRIVER_EXT_PORT
|
||||
serial_cfg.is_ext_uart = 1;
|
||||
serial_cfg.ext_uart_no = ADAPTER_HC08_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
@ -330,6 +331,7 @@ static int Hc08Ioctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.serial_bit_order = STOP_BITS_1;
|
||||
serial_cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
#ifdef ADAPTER_HC08_DRIVER_EXT_PORT
|
||||
serial_cfg.is_ext_uart = 1;
|
||||
serial_cfg.ext_uart_no = ADAPTER_HC08_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -402,6 +402,7 @@ static int Hfa21EthernetIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.serial_bit_order = BIT_ORDER_LSB;
|
||||
serial_cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
#ifdef ADAPTER_HFA21_DRIVER_EXT_PORT
|
||||
serial_cfg.is_ext_uart = 1;
|
||||
serial_cfg.ext_uart_no = ADAPTER_HFA21_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -359,6 +359,7 @@ static int E220Open(struct Adapter *adapter)
|
|||
|
||||
/*aiit board use ch438, so it needs more serial configuration*/
|
||||
#ifdef ADAPTER_E220_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_E220_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -59,6 +59,7 @@ static int BC28UartOpen(struct Adapter *adapter)
|
|||
|
||||
/*aiit board use ch438, so it needs more serial configuration*/
|
||||
#ifdef ADAPTER_BC28_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_BC28_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -82,6 +82,7 @@ static int Esp07sUartOpen(struct Adapter *adapter)
|
|||
cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
|
||||
#ifdef ADAPTER_ESP07S_DRIVER_EXT_PORT
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_ESP07S_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
@ -512,6 +513,7 @@ static int Esp07sWifiIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
cfg.serial_buffer_size = SERIAL_RB_BUFSZ;
|
||||
|
||||
#ifdef ADAPTER_ESP07S_DRIVER_EXT_PORT
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_ESP07S_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -474,6 +474,7 @@ static int Hfa21WifiIoctl(struct Adapter *adapter, int cmd, void *args)
|
|||
serial_cfg.serial_bit_order = BIT_ORDER_LSB;
|
||||
serial_cfg.serial_invert_mode = NRZ_NORMAL;
|
||||
#ifdef ADAPTER_HFA21_DRIVER_EXT_PORT
|
||||
serial_cfg.is_ext_uart = 1;
|
||||
serial_cfg.ext_uart_no = ADAPTER_HFA21_DRIVER_EXT_PORT;
|
||||
serial_cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -108,6 +108,7 @@ static int E18UartOpen(struct Adapter *adapter)
|
|||
|
||||
/*aiit board use ch438, so it needs more serial configuration*/
|
||||
#ifdef ADAPTER_E18_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = ADAPTER_E18_DRIVER_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -65,6 +65,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_AS830_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_AS830_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -70,6 +70,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_G8S_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_G8S_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -76,6 +76,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_ZG09_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_ZG09_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_TB600B_WQ_HCHO1OS_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_WQ_HCHO1OS_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -73,6 +73,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_TB600B_IAQ10_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_IAQ10_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -98,6 +98,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_PS5308_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_PS5308_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_TB600B_TVOC10_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_TB600B_TVOC10_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -102,6 +102,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_D124_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_D124_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,7 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_QS_FX_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_QS_FX_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -64,7 +64,8 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
|||
cfg.serial_parity_mode = PARITY_NONE;
|
||||
cfg.serial_bit_order = 0;
|
||||
cfg.serial_invert_mode = 0;
|
||||
#ifdef SENSOR_QS_FS_DRIVER_EXTUART
|
||||
#ifdef SENSOR_QS_FS_DRIVER_EXTUART
|
||||
cfg.is_ext_uart = 1;
|
||||
cfg.ext_uart_no = SENSOR_DEVICE_QS_FS_DEV_EXT_PORT;
|
||||
cfg.port_configure = PORT_CFG_INIT;
|
||||
#endif
|
||||
|
|
|
@ -142,7 +142,8 @@ struct SerialDataCfg
|
|||
uint8_t serial_invert_mode;
|
||||
uint16_t serial_buffer_size;
|
||||
|
||||
uint8 ext_uart_no;
|
||||
uint8_t is_ext_uart;
|
||||
uint8_t ext_uart_no;
|
||||
enum ExtSerialPortConfigure port_configure;
|
||||
};
|
||||
|
||||
|
|
|
@ -145,6 +145,7 @@ struct SerialDataCfg
|
|||
uint8_t serial_invert_mode;
|
||||
uint16_t serial_buffer_size;
|
||||
|
||||
uint8_t is_ext_uart;
|
||||
uint8_t ext_uart_no;
|
||||
enum ExtSerialPortConfigure port_configure;
|
||||
};
|
||||
|
|
|
@ -133,6 +133,7 @@ struct SerialDataCfg
|
|||
uint16_t serial_buffer_size;
|
||||
int32 serial_timeout;
|
||||
|
||||
uint8_t is_ext_uart;
|
||||
uint8_t ext_uart_no;
|
||||
enum ExtSerialPortConfigure port_configure;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue