int i2c_read_data(char addr, char reg, char *val, int len) { struct i2c_rdwr_ioctl_data *data; int i,ret = 0; ret =ioctl(i2c_fd, I2C_RDWR, data) ; } int i2c_open( char* dev, unsigned int timeout, unsigned int retry) { if ((i2c_fd = open(dev, O_RDWR)) < 0) return i2c_fd; } int main () { i2c_fd = i2c_open(i2c_dev, 3, 3); WitInit(WIT_PROTOCOL_I2C, 0x50); WitI2cFuncRegister(i2c_write, i2c_read); output = fopen("/mnt/sdcard/vedio/cameraVideo.264", "w"); set_encMedia_channel_callback(encodeChn_Id, StreamOutpuHandle, NULL); ret = set_encMedia_channel_workPara(encodeChn_Id, &wp, NULL); } } 您好,这是我的代码大概逻辑,当我的程序运行时会偶尔能跑起来偶尔跑不起来,上面是程序无法正常运行的log报错,其中 set_encMedia_channel_workPara(encodeChn_Id, &wp, NULL);这个函数并没有对i2c设备进行操作,请问一下是否可以看出是什么问题吗? |
-
0405fbe8f0d1ca9de2c81fe78de6d73.png (23.81 KB, 下载次数: 418)
-
1.85 KB, 下载次数: 0, 下载积分: 灯泡 -1 , 经验 -1