From d0f9d78335c0a4b816a1b7eda25a3513689f02b5 Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 1 May 2007 15:01:23 +0200 Subject: * 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 --- src/main.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 1417b24..2ad009e 100644 --- a/src/main.h +++ b/src/main.h @@ -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 + +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]; -- cgit v1.2.3