diff options
author | Joshua Hill | 2010-06-02 04:13:25 +0800 |
---|---|---|
committer | rcg4u | 2010-06-09 17:17:06 +0800 |
commit | bab56cf4083c2d0695215ba785019532ffae5749 (patch) | |
tree | bcc8ff80fc9152823c5881de9d0163a124d369f1 /src/dfu.c | |
parent | 4de6d38c54d9f641006539a06083e423a5d0c9c9 (diff) | |
download | idevicerestore-bab56cf4083c2d0695215ba785019532ffae5749.tar.gz idevicerestore-bab56cf4083c2d0695215ba785019532ffae5749.tar.bz2 |
Began major refactoring, not quite finished yet, this branch is probably broke
Diffstat (limited to 'src/dfu.c')
-rw-r--r-- | src/dfu.c | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -20,9 +20,37 @@ */ #include <stdint.h> +#include <libirecovery.h> #include "dfu.h" +int dfu_check_mode() { + irecv_client_t dfu = NULL; + irecv_error_t dfu_error = IRECV_E_SUCCESS; + + dfu_error = irecv_open(&dfu); + if (dfu_error != IRECV_E_SUCCESS) { + return -1; + } + + if(dfu->mode != kDfuMode) { + irecv_close(dfu); + return -1; + } + + irecv_close(dfu); + dfu = NULL; + return 0; +} + +int dfu_get_cpid(uint32_t* cpid) { + return 0; +} + +int dfu_get_bdid(uint32_t* bdid) { + return 0; +} + int dfu_get_ecid(uint64_t* ecid) { return 0; } |