summaryrefslogtreecommitdiffstats
path: root/src/dfu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dfu.c')
-rw-r--r--src/dfu.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 5e13f38..1da895d 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -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;
}