int lcd_id_get(char* id) { int lcd_fd = open_lcd_device(); int result = 0; int ioctl_cmd_temp = EDID_IOCTL_GET_VID_PID; if (!id) { __android_log_print(ANDROID_LOG_ERROR, "lib_rkinfo", "%s:id is null\n", __FUNCTION__); goto error; } if (0 > ioctl(lcd_fd, ioctl_cmd_temp, id)) { __android_log_print(ANDROID_LOG_ERROR, "lib_rkinfo", "%s:line=%d,error=%s", __FUNCTION__, __LINE__, strerror(errno)); result = -1; goto error; } return result; error: strcpy(id, "123456789"); return result; }
lcd::lcd(std::string & path) { lcd_path=path; if (open_lcd_device()) {perror("!!");}; if (init_lcd_device()) {perror("!!");}; }