fd = open("/dvs/devHardware.txt", 0);
if(fd<0)
{
printf("Open devHardware error!\n");
return -1;
}
else
{
printf("check_sensor_Version\n");
read(fd, s, 1024);
if (strstr(s, "SensorType=\"1\"")!=NULL)
{
printf("change !!!\n sensor type is ov9712_plus!!!!!\n");
}
else
{
printf("sensor type is ov9712!!!!!\n");
memcpy(&st_coms_isp_default,&st_coms_isp_default_ov9712_O, sizeof(cmos_isp_default_t));
memcpy(&st_isp_noise_table, &st_isp_noise_table_ov9712_O, sizeof(cmos_isp_noise_table_t));
memcpy(&st_isp_shading_table, &st_isp_shading_table_ov9712_O, sizeof(cmos_isp_shading_table_t));
memcpy(&st_isp_gamma_table, &st_isp_gamma_table_ov9712_O, sizeof(cmos_isp_gamma_table_t));
}
}
if(fd<0)
{
printf("Open devHardware error!\n");
return -1;
}
else
{
printf("check_sensor_Version\n");
read(fd, s, 1024);
if (strstr(s, "SensorType=\"1\"")!=NULL)
{
printf("change !!!\n sensor type is ov9712_plus!!!!!\n");
}
else
{
printf("sensor type is ov9712!!!!!\n");
memcpy(&st_coms_isp_default,&st_coms_isp_default_ov9712_O, sizeof(cmos_isp_default_t));
memcpy(&st_isp_noise_table, &st_isp_noise_table_ov9712_O, sizeof(cmos_isp_noise_table_t));
memcpy(&st_isp_shading_table, &st_isp_shading_table_ov9712_O, sizeof(cmos_isp_shading_table_t));
memcpy(&st_isp_gamma_table, &st_isp_gamma_table_ov9712_O, sizeof(cmos_isp_gamma_table_t));
}
}