Lines Matching refs:gOpts

50     gOpts.link          = Link_Default;  in setOpts()
51 gOpts.mode = Mode_Default; in setOpts()
52 gOpts.capture = Capture_Default; in setOpts()
53 gOpts.imgFile = NULL; in setOpts()
54 gOpts.fImg = NULL; in setOpts()
55 gOpts.mosiFile = (char*)"Mosi.bin"; in setOpts()
56 gOpts.fMosi = NULL; in setOpts()
57 gOpts.misoFile = (char*)"Miso.bin"; in setOpts()
58 gOpts.fMiso = NULL; in setOpts()
94 if (Capture_Off != gOpts.capture) { in init()
96 if (NULL == (gOpts.fMosi = fopen(gOpts.mosiFile, "wb"))) { in init()
97 ALOGD("ERROR: Cannot open %s file for writing!\n", gOpts.mosiFile); in init()
101 if (NULL == (gOpts.fMiso = fopen(gOpts.misoFile, "wb"))) { in init()
102 ALOGD("ERROR: Cannot open %s file for writing!\n", gOpts.misoFile); in init()
106 if (Capture_Apdu_With_Dummy_Miso == gOpts.capture) { in init()
118 if (NULL != gOpts.fImg) in cleanup()
120 fclose(gOpts.fImg); in cleanup()
123 if (NULL != gOpts.fMosi) in cleanup()
125 fclose(gOpts.fMosi); in cleanup()
128 if (NULL != gOpts.fMiso) in cleanup()
130 fclose(gOpts.fMiso); in cleanup()
731 switch (gOpts.capture) in phHbci_GetApdu()
734 if (sz != (ret = fwrite(gDummyMiso, sizeof(uint8_t), sz, gOpts.fMosi))) in phHbci_GetApdu()
736 ALOGD("ERROR: %s dummy write returned %d, expected %d\n", gOpts.mosiFile, ret, sz); in phHbci_GetApdu()
738 if (sz != (ret = fwrite(pApdu, sizeof(uint8_t), sz, gOpts.fMiso))) in phHbci_GetApdu()
740 ALOGD("ERROR: %s write returned %d, expected %d\n", gOpts.misoFile, ret, sz); in phHbci_GetApdu()
744 if (sz != (ret = fwrite(pApdu, sizeof(uint8_t), sz, gOpts.fMiso))) in phHbci_GetApdu()
746 ALOGD("ERROR: %s write returned %d, expected %d\n", gOpts.misoFile, ret, sz); in phHbci_GetApdu()
776 switch (gOpts.capture) in phHbci_PutApdu()
959 switch (gOpts.mode) in phNxpUciHal_fw_download()
972 ALOGD("ERROR: Undefined Master Mode = %u\n", gOpts.mode); in phNxpUciHal_fw_download()
976 if(gOpts.fImg == NULL) { in phNxpUciHal_fw_download()
977 gOpts.fImg = fopen(default_fw_path.c_str(), "rb"); in phNxpUciHal_fw_download()
979 if(gOpts.fImg == NULL) { in phNxpUciHal_fw_download()
983 fseek(gOpts.fImg, 0, SEEK_END); in phNxpUciHal_fw_download()
984 imgSz = (uint32_t)ftell(gOpts.fImg); in phNxpUciHal_fw_download()
988 ALOGD("ERROR: %s image size (%d) not supported!\n", gOpts.imgFile, imgSz); in phNxpUciHal_fw_download()
992 rewind(gOpts.fImg); in phNxpUciHal_fw_download()
995 if (imgSz == fread(pImg, sizeof(uint8_t), imgSz, gOpts.fImg)) in phNxpUciHal_fw_download()