2021-03-14 11:42:18 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
|
|
|
|
#ifndef USB_DWC3_H
|
|
|
|
#define USB_DWC3_H
|
|
|
|
|
|
|
|
#include "dart.h"
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
typedef struct dwc3_dev dwc3_dev_t;
|
|
|
|
|
|
|
|
dwc3_dev_t *usb_dwc3_init(uintptr_t regs, dart_dev_t *dart);
|
|
|
|
void usb_dwc3_shutdown(dwc3_dev_t *dev);
|
|
|
|
|
|
|
|
void usb_dwc3_handle_events(dwc3_dev_t *dev);
|
|
|
|
|
2021-04-17 07:43:52 +00:00
|
|
|
bool usb_dwc3_can_read(dwc3_dev_t *dev);
|
|
|
|
bool usb_dwc3_can_write(dwc3_dev_t *dev);
|
2021-03-14 11:42:18 +00:00
|
|
|
|
|
|
|
u8 usb_dwc3_getbyte(dwc3_dev_t *dev);
|
|
|
|
void usb_dwc3_putbyte(dwc3_dev_t *dev, u8 byte);
|
|
|
|
|
2021-04-17 07:43:52 +00:00
|
|
|
size_t usb_dwc3_write(dwc3_dev_t *dev, const void *buf, size_t count);
|
2021-03-14 11:42:18 +00:00
|
|
|
size_t usb_dwc3_read(dwc3_dev_t *dev, void *buf, size_t count);
|
|
|
|
|
|
|
|
#endif
|