From a814b04770dc83774cd705d2fc8993f24e504a01 Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Thu, 13 May 2010 15:10:40 -0400 Subject: Implemented irecv_get_status() to return current iphone usb "state". Implemented irecv_send_buffer() to upload a buffer to the device load address. Implemented irecv_send_file() to read a file into memory and pass the buffer into irecv_send_buffer() --- src/irecovery.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/irecovery.c') diff --git a/src/irecovery.c b/src/irecovery.c index 51320a5..3091319 100644 --- a/src/irecovery.c +++ b/src/irecovery.c @@ -22,7 +22,7 @@ #include enum { - kResetDevice, kSendCommand + kResetDevice, kSendCommand, kSendFile }; void print_usage() { @@ -51,8 +51,13 @@ int main(int argc, char** argv) { break; case 'c': - argument = optarg; action = kSendCommand; + argument = optarg; + break; + + case 'f': + action = kSendFile; + argument = optarg; break; default: @@ -77,8 +82,12 @@ int main(int argc, char** argv) { irecv_reset(device); break; + case kSendFile: + irecv_send_file(device, argument); + break; + case kSendCommand: - irecv_command(device, argument); + irecv_send_command(device, argument); break; default: -- cgit v1.1-32-gdbae