mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
feat: libusb backend
This commit is contained in:
1 parent
2914030e65
commit
d8154c3aeb
16 files changed
+1701
-402
No files matched your search
@@ -0,0 +1,42 @@
|
||||
#ifndef DFU_H
|
||||
#define DFU_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __APPLE__
|
||||
# include "usb-libusb.h"
|
||||
#endif
|
||||
|
||||
#define DFU_DNLOAD 1
|
||||
#define DFU_UPLOAD 2
|
||||
#define DFU_GETSTATUS 3
|
||||
#define DFU_CLRSTATUS 4
|
||||
#define DFU_GETSTATE 5
|
||||
#define DFU_ABORT 6
|
||||
|
||||
#define DFU_FILE_SUFFIX_LENGTH 16
|
||||
#define EP0_MAX_PACKET_SIZE 0x40
|
||||
#define DFU_MAX_TRANSFER_SIZE 0x800
|
||||
#define DFU_STATUS_OK 0
|
||||
#define DFU_STATE_MANIFEST_SYNC 6
|
||||
#define DFU_STATE_MANIFEST 7
|
||||
#define DFU_STATE_MANIFEST_WAIT_RESET 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool dfu_device_set_await_reset(const usb_handle_t *handle);
|
||||
|
||||
int dfu_serial_number_get_cpid(char *serial);
|
||||
bool dfu_serial_number_is_in_dfu_mode(char *serial);
|
||||
bool dfu_serial_number_is_pwned(char *serial);
|
||||
bool dfu_serial_number_is_in_yolo_dfu(char *serial);
|
||||
bool device_serial_number_is_in_pongo_os(char *serial);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // DFU_H
|
||||
|
||||
Reference in new issue
Block a user