minix/drivers/usbd/hcd/musb/musb_core.h
Kees Jongenburger 880ae44a72 usb:Adding usb enumeration.
usbd update from JPEmbedded

Change-Id: I4098b29a3188abe7110d59f0746ea40ac5818bbf

http://gerrit.minix3.org/#/c/2698/
2014-07-28 17:05:40 +02:00

49 lines
1.6 KiB
C
Executable file

/*
* Interface of low level MUSB core logic (variant independent)
*/
#ifndef _MUSB_CORE_H_
#define _MUSB_CORE_H_
#include <usb/hcd_common.h>
/*===========================================================================*
* Types and constants *
*===========================================================================*/
/* Structure to hold Mentor USB core configuration
* May be more than one on a single chip
* Should be initialized by MUSB's variant specific code (like AM335x) */
typedef struct {
void * regs; /* Points to beginning of memory mapped registers */
hcd_reg1 ep; /* Currently used endpoint */
hcd_reg1 addr; /* Currently used address */
}
musb_core_config;
/*===========================================================================*
* Function prototypes *
*===========================================================================*/
/* Only to be used outside generic HCD code */
void musb_core_start(void *);
void musb_core_stop(void *);
/* For HCD interface */
void musb_setup_device(void *, hcd_reg1, hcd_reg1);
int musb_reset_device(void *, hcd_speed *);
void musb_setup_stage(void *, hcd_ctrlrequest *);
void musb_bulk_in_stage(void *, hcd_bulkrequest *);
void musb_bulk_out_stage(void *, hcd_bulkrequest *);
void musb_in_data_stage(void *);
void musb_out_data_stage(void *);
void musb_in_status_stage(void *);
void musb_out_status_stage(void *);
int musb_read_data(void *, hcd_reg1 *, int);
int musb_check_error(void *, hcd_transfer, hcd_direction);
#endif /* !_MUSB_CORE_H_ */