| 881 |
theseven |
1 |
#ifndef __CORE_SYNOPSYSOTG_SYNOPSYSOTG_H__
|
|
|
2 |
#define __CORE_SYNOPSYSOTG_SYNOPSYSOTG_H__
|
|
|
3 |
|
|
|
4 |
#include "global.h"
|
|
|
5 |
#include "protocol/usb/usb.h"
|
|
|
6 |
#include "core/synopsysotg/regs.h"
|
|
|
7 |
|
|
|
8 |
struct __attribute__((packed,aligned(4))) synopsysotg_config
|
|
|
9 |
{
|
|
|
10 |
volatile struct synopsysotg_core_regs* core;
|
|
|
11 |
uint32_t phy_16bit : 1;
|
|
|
12 |
uint32_t phy_ulpi : 1;
|
|
|
13 |
uint32_t use_dma : 1;
|
|
|
14 |
uint32_t shared_txfifo : 1;
|
|
|
15 |
uint32_t disable_double_buffering : 1;
|
|
|
16 |
uint32_t reserved0 : 3;
|
|
|
17 |
uint8_t reserved1;
|
|
|
18 |
uint16_t fifosize;
|
|
|
19 |
uint16_t txfifosize[16];
|
|
|
20 |
};
|
|
|
21 |
|
|
|
22 |
struct __attribute__((packed,aligned(4))) synopsysotg_state
|
|
|
23 |
{
|
|
|
24 |
int dummy[0];
|
|
|
25 |
struct
|
|
|
26 |
{
|
|
|
27 |
uint32_t* rxaddr;
|
|
|
28 |
const uint32_t* txaddr;
|
|
|
29 |
} endpoints[];
|
|
|
30 |
};
|
|
|
31 |
|
|
|
32 |
extern const struct usb_driver synopsysotg_driver;
|
|
|
33 |
|
|
|
34 |
extern void synopsysotg_irq(const struct usb_instance* instance);
|
|
|
35 |
extern void synopsysotg_target_enable_clocks(const struct usb_instance* instance);
|
|
|
36 |
extern void synopsysotg_target_disable_clocks(const struct usb_instance* instance);
|
|
|
37 |
extern void synopsysotg_target_enable_irq(const struct usb_instance* instance);
|
|
|
38 |
extern void synopsysotg_target_disable_irq(const struct usb_instance* instance);
|
|
|
39 |
extern void synopsysotg_target_clear_irq(const struct usb_instance* instance);
|
|
|
40 |
|
|
|
41 |
#endif
|