fix that i2c device of sensor framework cannot set i2c address

This commit is contained in:
Liu_Weichao
2021-12-10 10:23:30 +08:00
parent c9db5635b0
commit ead80da91f
19 changed files with 239 additions and 18 deletions

View File

@@ -58,6 +58,10 @@ static int SensorDeviceOpen(struct SensorDevice *sdev)
PrivMutexCreate(&buff_lock, 0);
sdev->fd = open(SENSOR_DEVICE_PS5308_DEV, O_RDWR);
if (sdev->fd < 0) {
printf("open %s error\n", SENSOR_DEVICE_PS5308_DEV);
return -1;
}
struct SerialDataCfg cfg;
cfg.serial_baud_rate = BAUD_RATE_9600;