2 * Interface of low level MUSB core logic (variant independent)
8 #include <usbd/hcd_common.h>
11 /*===========================================================================*
12 * Types and constants *
13 *===========================================================================*/
14 /* Structure to hold Mentor USB core configuration
15 * May be more than one on a single chip
16 * Should be initialized by MUSB's variant specific code (like AM335x) */
19 void * regs
; /* Points to beginning of memory mapped registers */
20 hcd_reg1 ep
; /* Currently used endpoint */
21 hcd_reg1 addr
; /* Currently used address */
22 hcd_datatog
* datatog_tx
; /* Should point at currently used TX toggle */
23 hcd_datatog
* datatog_rx
; /* Should point at currently used RX toggle */
28 /*===========================================================================*
29 * Function prototypes *
30 *===========================================================================*/
31 /* Only to be used outside generic HCD code */
32 void musb_core_start(void *);
33 void musb_core_stop(void *);
36 /* For HCD interface */
37 void musb_setup_device(void *, hcd_reg1
, hcd_reg1
,
38 hcd_datatog
*, hcd_datatog
*);
39 int musb_reset_device(void *, hcd_speed
*);
40 void musb_setup_stage(void *, hcd_ctrlrequest
*);
41 void musb_rx_stage(void *, hcd_datarequest
*);
42 void musb_tx_stage(void *, hcd_datarequest
*);
43 void musb_in_data_stage(void *);
44 void musb_out_data_stage(void *);
45 void musb_in_status_stage(void *);
46 void musb_out_status_stage(void *);
47 int musb_read_data(void *, hcd_reg1
*, hcd_reg1
);
48 int musb_check_error(void *, hcd_transfer
, hcd_reg1
, hcd_direction
);
51 #endif /* !_MUSB_CORE_H_ */