Lines Matching refs:dev
814 bool check_device_type(STRUCT_RKDEVICE_DESC &dev, UINT uiSupportType) in check_device_type() argument
816 if (((UINT)dev.emUsbType & uiSupportType) == (UINT)dev.emUsbType) in check_device_type()
869 bool write_parameter(STRUCT_RKDEVICE_DESC &dev, char *szParameter) in write_parameter() argument
875 if (!check_device_type(dev, RKUSB_MASKROM|RKUSB_LOADER)) in write_parameter()
878 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in write_parameter()
921 bool write_gpt(STRUCT_RKDEVICE_DESC &dev, char *szParameter) in write_gpt() argument
930 if (!check_device_type(dev, RKUSB_MASKROM)) in write_gpt()
933 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in write_gpt()
1763 bool download_boot(STRUCT_RKDEVICE_DESC &dev, char *szLoader) in download_boot() argument
1765 if (!check_device_type(dev, RKUSB_MASKROM)) in download_boot()
1784 dev.emDeviceType = pBoot->SupportDevice; in download_boot()
1785 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in download_boot()
1796 pDevice = new CRKDevice(dev); in download_boot()
1829 bool upgrade_loader(STRUCT_RKDEVICE_DESC &dev, char *szLoader) in upgrade_loader() argument
1831 if (!check_device_type(dev, RKUSB_MASKROM)) in upgrade_loader()
1859 dev.emDeviceType = pBoot->SupportDevice; in upgrade_loader()
1860 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in upgrade_loader()
2031 bool print_gpt(STRUCT_RKDEVICE_DESC &dev) in print_gpt() argument
2033 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in print_gpt()
2045 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in print_gpt()
2086 bool print_parameter(STRUCT_RKDEVICE_DESC &dev) in print_parameter() argument
2088 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in print_parameter()
2097 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in print_parameter()
2139 bool erase_flash(STRUCT_RKDEVICE_DESC &dev) in erase_flash() argument
2141 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in erase_flash()
2153 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in erase_flash()
2164 pDevice = new CRKDevice(dev); in erase_flash()
2200 pScan->Wait(dev, RKUSB_MASKROM, dev.usVid, dev.usPid); in erase_flash()
2212 bool test_device(STRUCT_RKDEVICE_DESC &dev) in test_device() argument
2214 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in test_device()
2219 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in test_device()
2239 bool reset_device(STRUCT_RKDEVICE_DESC &dev, BYTE subCode = RST_NONE_SUBCODE) in reset_device() argument
2241 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in reset_device()
2246 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in reset_device()
2267 bool change_storage(STRUCT_RKDEVICE_DESC &dev, BYTE storage) in change_storage() argument
2269 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in change_storage()
2274 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in change_storage()
2313 bool read_flash_id(STRUCT_RKDEVICE_DESC &dev) in read_flash_id() argument
2318 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_flash_id()
2321 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_flash_id()
2342 bool read_flash_info(STRUCT_RKDEVICE_DESC &dev) in read_flash_info() argument
2347 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_flash_info()
2350 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_flash_info()
2390 bool read_chip_info(STRUCT_RKDEVICE_DESC &dev) in read_chip_info() argument
2395 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_chip_info()
2398 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_chip_info()
2421 bool read_capability(STRUCT_RKDEVICE_DESC &dev) in read_capability() argument
2426 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_capability()
2429 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_capability()
2492 bool read_param(STRUCT_RKDEVICE_DESC &dev, u8 *pParam) in read_param() argument
2494 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_param()
2499 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_param()
2523 bool read_gpt(STRUCT_RKDEVICE_DESC &dev, u8 *pGpt) in read_gpt() argument
2525 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_gpt()
2531 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_gpt()
2553 bool read_lba(STRUCT_RKDEVICE_DESC &dev, UINT uiBegin, UINT uiLen, char *szFile) in read_lba() argument
2555 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in read_lba()
2564 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in read_lba()
2622 bool erase_ubi_block(STRUCT_RKDEVICE_DESC &dev, u32 uiOffset, u32 uiPartSize) in erase_ubi_block() argument
2633 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in erase_ubi_block()
2635 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in erase_ubi_block()
2757 bool write_sparse_lba(STRUCT_RKDEVICE_DESC &dev, UINT uiBegin, UINT uiSize, char *szFile) in write_sparse_lba() argument
2759 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in write_sparse_lba()
2772 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in write_sparse_lba()
2923 bool write_lba(STRUCT_RKDEVICE_DESC &dev, UINT uiBegin, char *szFile) in write_lba() argument
2925 if (!check_device_type(dev, RKUSB_LOADER | RKUSB_MASKROM)) in write_lba()
2938 pComm = new CRKUsbComm(dev, g_pLogObject, bRet); in write_lba()
3103 STRUCT_RKDEVICE_DESC dev; in handle_command() local
3157 bRet = pScan->GetDevice(dev, 0); in handle_command()
3171 bSuccess = reset_device(dev); in handle_command()
3180 bSuccess = reset_device(dev, uiSubCode); in handle_command()
3196 bSuccess = change_storage(dev, uiSubCode); in handle_command()
3200 bSuccess = test_device(dev); in handle_command()
3202 bSuccess = read_flash_id(dev); in handle_command()
3204 bSuccess = read_flash_info(dev); in handle_command()
3206 bSuccess = read_chip_info(dev); in handle_command()
3208 bSuccess = read_capability(dev); in handle_command()
3213 bSuccess = download_boot(dev, (char *)strLoader.c_str()); in handle_command()
3219 bSuccess = download_boot(dev, g_ConfigItemVec[ret].szItemValue); in handle_command()
3226 bSuccess = write_gpt(dev, (char *)strParameter.c_str()); in handle_command()
3233 bSuccess = write_parameter(dev, (char *)strParameter.c_str()); in handle_command()
3240 bSuccess = upgrade_loader(dev, (char *)strLoader.c_str()); in handle_command()
3245 bSuccess = erase_flash(dev); in handle_command()
3257 bSuccess = write_sparse_lba(dev, (u32)uiBegin, (u32)-1, argv[3]); in handle_command()
3261 bSuccess = erase_ubi_block(dev, (u32)uiBegin, (u32)-1); in handle_command()
3263 bSuccess = write_lba(dev, (u32)uiBegin, argv[3]); in handle_command()
3272 bRet = read_gpt(dev, master_gpt); in handle_command()
3277 bSuccess = write_sparse_lba(dev, (u32)lba, (u32)(lba_end - lba + 1), argv[3]); in handle_command()
3283 bSuccess = erase_ubi_block(dev, (u32)lba, (u32)lba_end); in handle_command()
3285 bSuccess = erase_ubi_block(dev, (u32)lba, (u32)(lba_end - lba + 1)); in handle_command()
3288 bSuccess = write_lba(dev, (u32)lba, argv[3]); in handle_command()
3295 bRet = read_param(dev, param_buffer); in handle_command()
3300 bSuccess = write_sparse_lba(dev, part_offset, part_size, argv[3]); in handle_command()
3305 bSuccess = erase_ubi_block(dev, part_offset, part_size); in handle_command()
3307 bSuccess = write_lba(dev, part_offset, argv[3]); in handle_command()
3334 bSuccess = read_lba(dev, uiBegin, uiLen, argv[4]); in handle_command()
3340 bSuccess = print_gpt(dev); in handle_command()
3342 bSuccess = print_parameter(dev); in handle_command()