* Move usb-dev related code to devices.c from main.c
* Create a root Makefile to build the flasher, logotool and install * Clean some warning messages
This commit is contained in:
1 parent
3e13254858
commit
d0f9d78335
6 files changed
+137
-90
No files matched your search
+19
@@ -5,6 +5,7 @@
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#define _GNU_SOURCE
|
||||
|
||||
|
||||
int reverse_extract_pieces(char *dir);
|
||||
void flash_image(char *filename, char *piece, char *version);
|
||||
int fiasco_read_image(char *file);
|
||||
@@ -15,6 +16,15 @@ void progressbar(unsigned long long part, unsigned long long total);
|
||||
char *fpid_file(char *filename);
|
||||
int add_piece(char *piece);
|
||||
|
||||
#include <usb.h>
|
||||
|
||||
extern struct usb_device *device;
|
||||
extern struct usb_dev_handle *dev;
|
||||
int is_valid_device(struct usb_device_descriptor *udd);
|
||||
void list_valid_devices();
|
||||
int usb_device_found(struct usb_device_descriptor *udd);
|
||||
|
||||
extern int verbose;
|
||||
#define D if (verbose)
|
||||
|
||||
#define CMD_WRITE 64
|
||||
@@ -30,6 +40,15 @@ struct piece_t {
|
||||
char *vers;
|
||||
};
|
||||
|
||||
struct devices {
|
||||
char *name;
|
||||
unsigned short vendor_id;
|
||||
unsigned short product_id;
|
||||
unsigned short flags;
|
||||
};
|
||||
#define SUPPORTED_DEVICES 5
|
||||
extern struct devices supported_devices[SUPPORTED_DEVICES];
|
||||
|
||||
extern int pcs_n;
|
||||
extern struct piece_t pcs[10];
|
||||
|
||||
|
||||
Reference in new issue
Block a user