repair ch4 test
This commit is contained in:
@@ -25,11 +25,11 @@ config SENSOR_AS830
|
||||
if SENSOR_AS830_DRIVER_EXTUART
|
||||
config SENSOR_DEVICE_AS830_DEV
|
||||
string "as830 device extra uart path"
|
||||
default "/dev/extuart_dev4"
|
||||
default "/dev/extuart_dev1"
|
||||
|
||||
config SENSOR_DEVICE_AS830_DEV_EXT_PORT
|
||||
int "if AS830 device using extuart, choose port"
|
||||
default "4"
|
||||
default "1"
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -39,6 +39,10 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
int result = 0;
|
||||
|
||||
sdev->fd = PrivOpen(SENSOR_DEVICE_AS830_DEV, O_RDWR);
|
||||
if (sdev->fd < 0) {
|
||||
printf("open %s error\n", SENSOR_DEVICE_AS830_DEV);
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct SerialDataCfg cfg;
|
||||
cfg.serial_baud_rate = BAUD_RATE_9600;
|
||||
@@ -58,8 +62,6 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
|
||||
ioctl_cfg.args = &cfg;
|
||||
result = PrivIoctl(sdev->fd, OPE_INT, &ioctl_cfg);
|
||||
|
||||
sdev->done->ioctl(sdev, SENSOR_DEVICE_PASSIVE);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user