Initial cut of the open ath9k htc firmware.
[open-ath9k-htc-firmware.git] / target_firmware / magpie_fw_dev / build / magpie_1_1 / inc / usb_api.h
1 #ifndef USB_API_H
2 #define USB_API_H
3
4 #include "dt_defs.h"
5
6 /******** hardware API table structure (API descriptions below) *************/
7 struct usb_api {
8     void (*_usb_init)(void);
9     void (*_usb_rom_task)(void);
10     void (*_usb_fw_task)(void);
11     void (*_usb_init_phy)(void);
12
13     // ep0 operation
14     void (*_usb_ep0_setup)(void);
15     
16     void (*_usb_ep0_tx)(void);
17     void (*_usb_ep0_rx)(void);
18
19     // get/set interface
20     BOOLEAN (*_usb_get_interface)(void);
21     BOOLEAN (*_usb_set_interface)(void);
22
23     // get/set configuration
24     BOOLEAN (*_usb_get_configuration)(void);
25     BOOLEAN (*_usb_set_configuration)(void);
26
27     // standard/vendor command
28     BOOLEAN (*_usb_standard_cmd)(void);    
29     void (*_usb_vendor_cmd)(void);
30
31     void (*_usb_power_off)(void);
32     void (*_usb_reset_fifo)(void);
33     void (*_usb_gen_wdt)(void);
34     void (*_usb_jump_boot)(void);
35     
36     BOOLEAN (*_usb_clr_feature)(void);
37     BOOLEAN (*_usb_set_feature)(void);    
38     BOOLEAN (*_usb_set_address)(void);
39     BOOLEAN (*_usb_get_descriptor)(void);
40
41     BOOLEAN (*_usb_get_status)(void);
42     void (*_usb_setup_desc)(void);
43     void (*_usb_reg_out)(void);
44     void (*_usb_status_in)(void);
45
46     void (*_usb_ep0_tx_data)(void);
47     void (*_usb_ep0_rx_data)(void);
48
49     void (*_usb_clk_init)(void);
50 };
51
52 #endif