#include <bitops.h>
#include <dmapool.h>
#include <slist.h>
#include <stdint.h>
#include <usb/request.h>
#include <usb/udc.h>
#include "usbb_regs.h"


Go to the source code of this file.
Data Structures | |
| struct | usbb_sw_dma_desc |
| USBB DMA descriptor. More... | |
Enumerations | |
| enum | ep0_state { EP0_STATE_SETUP = 0, EP0_STATE_DATA_IN, EP0_STATE_DATA_ZLP, EP0_STATE_DATA_OUT, EP0_STATE_STATUS_IN, EP0_STATE_STATUS_OUT, EP0_STATE_TEST_J, EP0_STATE_TEST_K, EP0_STATE_TEST_SE0_NAK, EP0_STATE_TEST_PACKET } |
Functions | |
| void | usbb_udc_interrupt (struct usbb_udc *udcb) |
| The USBB device-mode interrupt handler. | |
| void | usbb_udc_vbus_off (struct usbb_udc *udcb) |
| Signal that a low Vbus level has been detected. | |
| void | usbb_udc_vbus_on (struct usbb_udc *udcb) |
| Signal that a high Vbus level has been detected. | |
| struct usbb_udc * | usbb_udc_init (void) |
| Initialize the device part of the USBB controller. | |
| void | usbb_udc_shutdown (struct usbb_udc *udcb) |
| Shut down the device part of the USBB controller. | |
This header is for internal use only. There is lots of ugly preprocessor stuff in here so that the rest of the code can be reasonably clean and efficient.
Definition in file usbb_internal.h.
| enum ep0_state |
Control endpoint state.
Definition at line 89 of file usbb_internal.h.
| struct usbb_udc* usbb_udc_init | ( | void | ) | [read] |
Initialize the device part of the USBB controller.
For internal use only.
This function does any device-side initialization necessary when the USBB controller as a whole is being initialized. It does not enable any device-side functionality.
Definition at line 1802 of file usbb_udc.c.
References slist_init(), softirq_set_handler(), usbb_udc_softirq(), USBB_UDCON_LS, and USBB_UDCON_SPDCONF_FULL.
Referenced by usbb_init().

| void usbb_udc_interrupt | ( | struct usbb_udc * | udcb | ) |
The USBB device-mode interrupt handler.
For internal use only.
| udcb | The USBB Device Controller instance. |
Definition at line 1661 of file usbb_udc.c.
References softirq_raise().
Referenced by usbb_interrupt().

| void usbb_udc_shutdown | ( | struct usbb_udc * | udcb | ) |
Shut down the device part of the USBB controller.
For internal use only.
This function does any device-side cleanups necessary when the USBB controller as a whole is being shut down.
| udcb | The USBB device controller instance. |
Definition at line 1834 of file usbb_udc.c.
Referenced by usbb_init().
| void usbb_udc_vbus_off | ( | struct usbb_udc * | udcb | ) |
Signal that a low Vbus level has been detected.
For internal use only.
This function is called by the USBB bus interface driver when Vbus power is no longer provided by the host.
| udcb | The USBB Device Controller instance |
Definition at line 1734 of file usbb_udc.c.
References clear_bit(), dbg_printf, udc::flags, test_bit(), and USB_DEV_HAS_POWER.

| void usbb_udc_vbus_on | ( | struct usbb_udc * | udcb | ) |
Signal that a high Vbus level has been detected.
For internal use only.
This function is called by the USBB bus interface driver when Vbus power is provided by the host.
| udcb | The USBB Device Controller instance |
Definition at line 1714 of file usbb_udc.c.
References dbg_printf, udc::flags, set_bit(), test_bit(), and USB_DEV_HAS_POWER.

1.5.8