summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/g_fastboot.h
blob: e494edf444fca3716e53253ddc499ce8937380a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _G_FASTBOOT_H_
#define _G_FASTBOOT_H_

#define EP_BUFFER_SIZE			4096
#define FASTBOOT_INTERFACE_CLASS	0xff
#define FASTBOOT_INTERFACE_SUB_CLASS	0x42
#define FASTBOOT_INTERFACE_PROTOCOL	0x03
#define FASTBOOT_VERSION		"0.4"

extern struct fastboot_config fastboot_cfg;
extern struct usb_ep *ep_in;
extern struct usb_request *req_in;
extern struct usb_ep *ep_out;
extern struct usb_request *req_out;

void rx_handler_command(struct usb_ep *ep, struct usb_request *req);
int fastboot_tx_write(const char *buffer, unsigned int buffer_size);
const char *fb_find_usb_string(unsigned int id);

extern int handle_flash(char *part_name, char *response);
extern int do_format(void);

#endif