static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename) { int err; // Wait for user's action (execing program) sprintf(handle->updat->text, _("Waiting for execing of program...")); handle->updat->label(); do { handle->updat->refresh(); if (handle->updat->cancel) return ERR_ABORT; //send RDY request ??? PAUSE(1000); err = rd_is_ready(handle); } while (err == ERROR_READ_TIMEOUT); // Get dump TRYF(rd_dump(handle, filename)); return 0; }
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename) { int err; //uint16_t keys[] = { // 0x76, 0x08, 0x08, /* Quit, Clear, Clear, */ // 0x28, 0x3A, 0x34, 0x11, /* A, S, M, (, */ // 0x39, 0x36, 0x34, 0x2B, /* R, O, M, D */ // 0x56, 0x4E, 0x51, 0x12, /* u, m, p, ) */ // 0x06 /* Enter */ //}; // Wait for user's action (execing program) sprintf(handle->updat->text, _("Waiting for user's action...")); handle->updat->label(); do { handle->updat->refresh(); if (handle->updat->cancel) return ERR_ABORT; //send RDY request ??? PAUSE(1000); err = rd_is_ready(handle); } while (err == ERROR_READ_TIMEOUT); // Get dump TRYF(rd_dump(handle, filename)); return 0; }
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename) { int i, err = 0; static const uint16_t keys[] = { 0x40, 0x09, 0x09, /* Quit, Clear, Clear, */ 0xFE63, 0x97, 0xDA, /* Send(, 9, prgm */ 0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D */ 0xAE, 0xA6, 0xA9, 0x05 /* U, M, P, Enter */ }; // Launch program by remote control for(i = 0; i < (int)(sizeof(keys) / sizeof(keys[0])); i++) { TRYF(send_key(handle, keys[i])); PAUSE(100); } do { handle->updat->refresh(); if (handle->updat->cancel) return ERR_ABORT; //send RDY request ??? PAUSE(1000); err = rd_is_ready(handle); } while (err == ERROR_READ_TIMEOUT); // Get dump TRYF(rd_dump(handle, filename)); return 0; }