#include "dwc_list.h"
#include "dwc_otg_dbg.h"
#include "dwc_otg_regs.h"
#include "dwc_otg_core_if.h"
#include "dwc_otg_adp.h"
Go to the source code of this file.
Data Structures | |
| struct | iso_pkt_info |
| Information for each ISOC packet. More... | |
| struct | dwc_ep |
The dwc_ep structure represents the state of a single endpoint when acting in device mode. More... | |
| struct | dwc_hc |
| Host channel descriptor. More... | |
| struct | dwc_otg_core_params |
| The following parameters may be specified when starting the module. More... | |
| struct | ep_xfer_info |
| struct | dwc_otg_global_regs_backup |
| struct | dwc_otg_host_regs_backup |
| struct | dwc_otg_dev_regs_backup |
| struct | dwc_otg_core_if |
The dwc_otg_core_if structure contains information needed to manage the DWC_otg controller acting in either host or device mode. More... | |
| struct | dwc_otg_cil_callbacks |
| DWC_otg CIL callback structure. More... | |
Transfer state | |
| #define | MAX_DMA_DESC_CNT 256 |
| Max DMA Descriptor count for any EP. | |
Host CIL Functions | |
| The following functions support managing the DWC_otg controller in host mode. | |
| #define | clear_hc_int(_hc_regs_, _intr_) |
| #define | disable_hc_int(_hc_regs_, _intr_) |
| void | dwc_otg_hc_init (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| Prepares a host channel for transferring packets to/from a specific endpoint. | |
| void | dwc_otg_hc_halt (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc, dwc_otg_halt_status_e _halt_status) |
| Attempts to halt a host channel. | |
| void | dwc_otg_hc_cleanup (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| Clears the transfer state for a host channel. | |
| void | dwc_otg_hc_start_transfer (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| This function does the setup for a data transfer for a host channel and starts the transfer. | |
| int | dwc_otg_hc_continue_transfer (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
This function continues a data transfer that was started by previous call to dwc_otg_hc_start_transfer. | |
| void | dwc_otg_hc_do_ping (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| Starts a PING transfer. | |
| void | dwc_otg_hc_write_packet (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| void | dwc_otg_enable_host_interrupts (dwc_otg_core_if_t *_core_if) |
| This function enables the Host mode interrupts. | |
| void | dwc_otg_disable_host_interrupts (dwc_otg_core_if_t *_core_if) |
| This function disables the Host Mode interrupts. | |
| void | dwc_otg_hc_start_transfer_ddma (dwc_otg_core_if_t *core_if, dwc_hc_t *hc) |
| This function does the setup for a data transfer for a host channel and starts the transfer in Descriptor DMA mode. | |
| uint32_t | calc_frame_interval (dwc_otg_core_if_t *core_if) |
| Calculates and gets the frame Interval value of HFIR register according PHY type and speed.The application can modify a value of HFIR register only after the Port Enable bit of the Host Port Control and Status register (HPRT.PrtEnaPort) has been set. | |
| uint32_t | dwc_otg_read_hprt0 (dwc_otg_core_if_t *_core_if) |
| This function Reads HPRT0 in preparation to modify. | |
Device CIL Functions | |
| The following functions support managing the DWC_otg controller in device mode. | |
| void | dwc_otg_wakeup (dwc_otg_core_if_t *_core_if) |
| void | dwc_otg_read_setup_packet (dwc_otg_core_if_t *_core_if, uint32_t *_dest) |
| This function reads a setup packet from the Rx FIFO into the destination buffer. | |
| uint32_t | dwc_otg_get_frame_number (dwc_otg_core_if_t *_core_if) |
| Gets the current USB frame number. | |
| void | dwc_otg_ep0_activate (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function enables EP0 OUT to receive SETUP packets and configures EP0 IN for transmitting packets. | |
| void | dwc_otg_ep_activate (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function activates an EP. | |
| void | dwc_otg_ep_deactivate (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function deactivates an EP. | |
| void | dwc_otg_ep_start_transfer (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function does the setup for a data transfer for an EP and starts the transfer. | |
| void | dwc_otg_ep_start_zl_transfer (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function setup a zero length transfer in Buffer DMA and Slave modes for usb requests with zero field set. | |
| void | dwc_otg_ep0_start_transfer (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function does the setup for a data transfer for EP0 and starts the transfer. | |
| void | dwc_otg_ep0_continue_transfer (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function continues control IN transfers started by dwc_otg_ep0_start_transfer, when the transfer does not fit in a single packet. | |
| void | dwc_otg_ep_write_packet (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep, int _dma) |
| This function writes a packet into the Tx FIFO associated with the EP. | |
| void | dwc_otg_ep_set_stall (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| Set the EP STALL. | |
| void | dwc_otg_ep_clear_stall (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| Clear the EP STALL. | |
| void | dwc_otg_enable_device_interrupts (dwc_otg_core_if_t *_core_if) |
| This function enables the Device mode interrupts. | |
| void | dwc_otg_iso_ep_start_frm_transfer (dwc_otg_core_if_t *core_if, dwc_ep_t *ep) |
| This function initializes a descriptor chain for Isochronous transfer. | |
| void | dwc_otg_iso_ep_start_buf_transfer (dwc_otg_core_if_t *core_if, dwc_ep_t *ep) |
| This function initializes a descriptor chain for Isochronous transfer. | |
Common CIL Functions | |
| The following functions support managing the DWC_otg controller in either device or host mode. | |
| void | dwc_otg_read_packet (dwc_otg_core_if_t *core_if, uint8_t *dest, uint16_t bytes) |
| This function reads a packet from the Rx FIFO into the destination buffer. | |
| void | dwc_otg_flush_tx_fifo (dwc_otg_core_if_t *_core_if, const int _num) |
| Flush a Tx FIFO. | |
| void | dwc_otg_flush_rx_fifo (dwc_otg_core_if_t *_core_if) |
| Flush Rx FIFO. | |
| void | dwc_otg_core_reset (dwc_otg_core_if_t *_core_if) |
| Do core a soft reset of the core. | |
| uint32_t | dwc_otg_read_core_intr (dwc_otg_core_if_t *core_if) |
| This function returns the Core Interrupt register. | |
| uint32_t | dwc_otg_read_otg_intr (dwc_otg_core_if_t *core_if) |
| This function returns the OTG Interrupt register. | |
| uint32_t | dwc_otg_read_dev_all_in_ep_intr (dwc_otg_core_if_t *core_if) |
| This function reads the Device All Endpoints Interrupt register and returns the IN endpoint interrupt bits. | |
| uint32_t | dwc_otg_read_dev_all_out_ep_intr (dwc_otg_core_if_t *core_if) |
| This function reads the Device All Endpoints Interrupt register and returns the OUT endpoint interrupt bits. | |
| uint32_t | dwc_otg_read_dev_in_ep_intr (dwc_otg_core_if_t *core_if, dwc_ep_t *ep) |
| This function returns the Device IN EP Interrupt register. | |
| uint32_t | dwc_otg_read_dev_out_ep_intr (dwc_otg_core_if_t *_core_if, dwc_ep_t *_ep) |
| This function returns the Device OUT EP Interrupt register. | |
| uint32_t | dwc_otg_read_host_all_channels_intr (dwc_otg_core_if_t *_core_if) |
| This function returns the Host All Channel Interrupt register. | |
| uint32_t | dwc_otg_read_host_channel_intr (dwc_otg_core_if_t *_core_if, dwc_hc_t *_hc) |
| uint32_t | dwc_otg_mode (dwc_otg_core_if_t *_core_if) |
| This function returns the mode of the operation, host or device. | |
Defines | |
| #define | __DWC_CIL_H__ |
| #define | OTG_CORE_REV_2_60a 0x4F54260A |
| Macros defined for DWC OTG HW Release version. | |
| #define | OTG_CORE_REV_2_71a 0x4F54271A |
| #define | OTG_CORE_REV_2_72a 0x4F54272A |
| #define | OTG_CORE_REV_2_80a 0x4F54280A |
| #define | OTG_CORE_REV_2_81a 0x4F54281A |
| #define | OTG_CORE_REV_2_90a 0x4F54290A |
| #define | OTG_CORE_REV_2_91a 0x4F54291A |
| #define | OTG_CORE_REV_2_92a 0x4F54292A |
| #define | OTG_CORE_REV_2_93a 0x4F54293A |
| #define | OTG_CORE_REV_2_94a 0x4F54294A |
| #define | DWC_OTG_EP_TYPE_CONTROL 0 |
| #define | DWC_OTG_EP_TYPE_ISOC 1 |
| #define | DWC_OTG_EP_TYPE_BULK 2 |
| #define | DWC_OTG_EP_TYPE_INTR 3 |
| #define | DWC_OTG_EP_SPEED_LOW 0 |
| #define | DWC_OTG_EP_SPEED_FULL 1 |
| #define | DWC_OTG_EP_SPEED_HIGH 2 |
| #define | DWC_OTG_HC_PID_DATA0 0 |
| #define | DWC_OTG_HC_PID_DATA2 1 |
| #define | DWC_OTG_HC_PID_DATA1 2 |
| #define | DWC_OTG_HC_PID_MDATA 3 |
| #define | DWC_OTG_HC_PID_SETUP 3 |
| #define | DWC_OTG_PCGCCTL_OFFSET 0xE00 |
| #define | DWC_OTG_DATA_FIFO_OFFSET 0x1000 |
| #define | DWC_OTG_DATA_FIFO_SIZE 0x1000 |
| #define | A_HOST (1) |
| A-Device is a_host. | |
| #define | A_SUSPEND (2) |
| A-Device is a_suspend. | |
| #define | A_PERIPHERAL (3) |
| A-Device is a_peripherial. | |
| #define | B_PERIPHERAL (4) |
| B-Device is operating as a Peripheral. | |
| #define | B_HOST (5) |
| B-Device is operating as a Host. | |
Typedefs | |
| typedef iso_pkt_info | iso_pkt_info_t |
| Information for each ISOC packet. | |
| typedef dwc_ep | dwc_ep_t |
The dwc_ep structure represents the state of a single endpoint when acting in device mode. | |
| typedef enum dwc_otg_halt_status | dwc_otg_halt_status_e |
| typedef dwc_hc | dwc_hc_t |
| Host channel descriptor. | |
| typedef dwc_otg_core_params | dwc_otg_core_params_t |
| The following parameters may be specified when starting the module. | |
| typedef ep_xfer_info | ep_xfer_info_t |
| typedef enum dwc_otg_lx_state | dwc_otg_lx_state_e |
| typedef dwc_otg_cil_callbacks | dwc_otg_cil_callbacks_t |
| DWC_otg CIL callback structure. | |
Enumerations | |
| enum | dwc_otg_halt_status { DWC_OTG_HC_XFER_NO_HALT_STATUS, DWC_OTG_HC_XFER_COMPLETE, DWC_OTG_HC_XFER_URB_COMPLETE, DWC_OTG_HC_XFER_ACK, DWC_OTG_HC_XFER_NAK, DWC_OTG_HC_XFER_NYET, DWC_OTG_HC_XFER_STALL, DWC_OTG_HC_XFER_XACT_ERR, DWC_OTG_HC_XFER_FRAME_OVERRUN, DWC_OTG_HC_XFER_BABBLE_ERR, DWC_OTG_HC_XFER_DATA_TOGGLE_ERR, DWC_OTG_HC_XFER_AHB_ERR, DWC_OTG_HC_XFER_PERIODIC_INCOMPLETE, DWC_OTG_HC_XFER_URB_DEQUEUE } |
| enum | dwc_otg_lx_state { DWC_OTG_L0, DWC_OTG_L1, DWC_OTG_L2, DWC_OTG_L3 } |
Functions | |
| void | ep_xfer_timeout (void *ptr) |
| void | w_conn_id_status_change (void *p) |
| void | w_wakeup_detected (void *p) |
| int | dwc_otg_save_global_regs (dwc_otg_core_if_t *core_if) |
| Saves global register values into system memory. | |
| int | dwc_otg_save_dev_regs (dwc_otg_core_if_t *core_if) |
| Saves device register values into system memory. | |
| int | dwc_otg_save_host_regs (dwc_otg_core_if_t *core_if) |
| Saves host register values into system memory. | |
| int | dwc_otg_restore_global_regs (dwc_otg_core_if_t *core_if) |
| Restore global register values. | |
| int | dwc_otg_restore_host_regs (dwc_otg_core_if_t *core_if, int reset) |
| Restore host register values. | |
| int | dwc_otg_restore_dev_regs (dwc_otg_core_if_t *core_if, int rem_wakeup) |
| Restore device register values. | |
| int | restore_lpm_i2c_regs (dwc_otg_core_if_t *core_if) |
| int | restore_essential_regs (dwc_otg_core_if_t *core_if, int rmode, int is_host) |
| int | dwc_otg_host_hibernation_restore (dwc_otg_core_if_t *core_if, int restore_mode, int reset) |
| int | dwc_otg_device_hibernation_restore (dwc_otg_core_if_t *core_if, int rem_wakeup, int reset) |
| void | dwc_otg_core_host_init (dwc_otg_core_if_t *_core_if) |
| This function initializes the DWC_otg controller registers for host mode. | |
| void | dwc_otg_core_dev_init (dwc_otg_core_if_t *_core_if) |
| This function initializes the DWC_otg controller registers for device mode. | |
| void | dwc_otg_cil_register_pcd_callbacks (dwc_otg_core_if_t *_core_if, dwc_otg_cil_callbacks_t *_cb, void *_p) |
| Register PCD callbacks. | |
| void | dwc_otg_cil_register_hcd_callbacks (dwc_otg_core_if_t *_core_if, dwc_otg_cil_callbacks_t *_cb, void *_p) |
| Register HCD callbacks. | |
| void | dwc_otg_initiate_srp (dwc_otg_core_if_t *core_if) |
| void | cil_hcd_start (dwc_otg_core_if_t *core_if) |
| Start the HCD. | |
| void | cil_hcd_stop (dwc_otg_core_if_t *core_if) |
| Stop the HCD. | |
| void | cil_hcd_disconnect (dwc_otg_core_if_t *core_if) |
| Disconnect the HCD. | |
| void | cil_hcd_session_start (dwc_otg_core_if_t *core_if) |
| Inform the HCD the a New Session has begun. | |
| void | cil_hcd_resume (dwc_otg_core_if_t *core_if) |
| Resume the HCD. | |
| void | cil_pcd_start (dwc_otg_core_if_t *core_if) |
| Start the PCD. | |
| void | cil_pcd_stop (dwc_otg_core_if_t *core_if) |
| Stop the PCD. | |
| void | cil_pcd_suspend (dwc_otg_core_if_t *core_if) |
| Suspend the PCD. | |
| void | cil_pcd_resume (dwc_otg_core_if_t *core_if) |
| Resume the PCD. | |
Definition in file dwc_otg_cil.h.
|
|
Value: do { \ hcint_data_t hcint_clear = {.d32 = 0}; \ hcint_clear.b._intr_ = 1; \ DWC_WRITE_REG32(&(_hc_regs_)->hcint, hcint_clear.d32); \ } while (0) Definition at line 1101 of file dwc_otg_cil.h. |
|
|
Value: do { \ hcintmsk_data_t hcintmsk = {.d32 = 0}; \ hcintmsk.b._intr_ = 1; \ DWC_MODIFY_REG32(&(_hc_regs_)->hcintmsk, hcintmsk.d32, 0); \ } while (0) Definition at line 1115 of file dwc_otg_cil.h. |
|
|
The It contains the data items needed for an endpoint to be activated and transfer packets. |
|
|
Host channel descriptor. This structure represents the state of a single host channel when acting in host mode. It contains the data items needed to transfer packets to an endpoint via a host channel. |
|
|
The following parameters may be specified when starting the module. These parameters define how the DWC_otg controller should be configured. |
|
|
DWC_otg CIL callback structure. This structure allows the HCD and PCD to register functions used for starting and stopping the PCD and HCD for role change on for a DRD. |
|
|
Definition at line 740 of file dwc_otg_cil.h. |
|
|
Change to L0 state Definition at line 398 of file dwc_otg_cil_intr.c. |
|
|
This function initializes the DWC_otg controller registers for host mode. This function flushes the Tx and Rx FIFOs and it flushes any entries in the request queues. Host channels are reset to ensure that they are ready for performing transfers.
Definition at line 2019 of file dwc_otg_cil.c. |
|
|
This function initializes the DWC_otg controller registers for device mode.
Set Periodic Tx FIFO Mask all bits 0 Set Tx FIFO Mask all bits 0
Definition at line 1620 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function reads a setup packet from the Rx FIFO into the destination buffer. This function is called from the Rx Status Queue Level (RxStsQLvl) Interrupt routine when a SETUP packet has been received in Slave mode.
Definition at line 3144 of file dwc_otg_cil.c. |
|
|
Gets the current USB frame number. This is the frame number from the last SOF packet. Definition at line 3086 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function enables EP0 OUT to receive SETUP packets and configures EP0 IN for transmitting packets. It is normally called when the "Enumeration Done" interrupt occurs.
Definition at line 3161 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function activates an EP. The Device EP control register for the EP is configured as defined in the ep structure. Note: This function is not used for EP0.
Definition at line 3214 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function deactivates an EP. This is done by clearing the USB Active EP bit in the Device EP control register. Note: This function is not used for EP0. EP0 cannot be deactivated.
Definition at line 3369 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function does the setup for a data transfer for an EP and starts the transfer. For an IN transfer, the packets will be loaded into the appropriate Tx FIFO in the ISR. For OUT transfers, the packets are unloaded from the Rx FIFO in the ISR. the ISR.
DIEPDMAn Register write Enable the Non-Periodic Tx FIFO empty interrupt, or the Tx FIFO epmty interrupt in dedicated Tx FIFO mode, the data will be written into the fifo by the ISR. This is used for interrupt out transfers DOEPDMAn Register write Definition at line 3655 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function setup a zero length transfer in Buffer DMA and Slave modes for usb requests with zero field set.
Enable the Non-Periodic Tx FIFO empty interrupt, or the Tx FIFO epmty interrupt in dedicated Tx FIFO mode, the data will be written into the fifo by the ISR. Definition at line 3948 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function does the setup for a data transfer for EP0 and starts the transfer. For an IN transfer, the packets will be loaded into the appropriate Tx FIFO in the ISR. For OUT transfers, the packets are unloaded from the Rx FIFO in the ISR.
DMA Descriptor Setup DIEPDMA0 Register write Enable the Non-Periodic Tx FIFO empty interrupt, the data will be written into the fifo by the ISR. DMA Descriptor Setup DOEPDMA0 Register write Definition at line 4051 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function continues control IN transfers started by dwc_otg_ep0_start_transfer, when the transfer does not fit in a single packet. NOTE: The DIEPCTL0/DOEPCTL0 registers only have one bit for the packet count.
DMA Descriptor Setup DIEPDMA0 Register write Enable the Non-Periodic Tx FIFO empty interrupt, the data will be written into the fifo by the ISR. DMA Descriptor Setup DOEPDMA0 Register write Definition at line 4239 of file dwc_otg_cil.c. |
|
||||||||||||||||
|
This function writes a packet into the Tx FIFO associated with the EP. For non-periodic EPs the non-periodic Tx FIFO is written. For periodic EPs the periodic Tx FIFO associated with the EP is written with all packets for the next micro-frame.
The buffer is padded to DWORD on a per packet basis in slave/dma mode if the MPS is not DWORD aligned. The last packet, if short, is also padded to a multiple of DWORD. ep->xfer_buff always starts DWORD aligned in memory and is a multiple of DWORD in length ep->xfer_len can be any number of bytes ep->xfer_count is a multiple of ep->maxpacket until the last packet FIFO access is DWORD
Definition at line 4438 of file dwc_otg_cil.c. |
|
||||||||||||
|
Set the EP STALL.
Definition at line 4509 of file dwc_otg_cil.c. |
|
||||||||||||
|
Clear the EP STALL.
Definition at line 4547 of file dwc_otg_cil.c. |
|
|
This function enables the Device mode interrupts.
Definition at line 1526 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function initializes a descriptor chain for Isochronous transfer.
Enable endpoint, clear nak Definition at line 5161 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function initializes a descriptor chain for Isochronous transfer.
Enable endpoint, clear nak Definition at line 540 of file dwc_otg_pcd.c. |
|
||||||||||||
|
Prepares a host channel for transferring packets to/from a specific endpoint. The HCCHARn register is set up with the characteristics specified in _hc. Host channel interrupts that may need to be serviced while this transfer is in progress are enabled.
Definition at line 2206 of file dwc_otg_cil.c. |
|
||||||||||||||||
|
Attempts to halt a host channel. This function should only be called in Slave mode or to abort a transfer in either Slave mode or DMA mode. Under normal circumstances in DMA mode, the controller halts the channel when the transfer is complete or a condition occurs that requires application intervention. In slave mode, checks for a free request queue entry, then sets the Channel Enable and Channel Disable bits of the Host Channel Characteristics register of the specified channel to intiate the halt. If there is no free request queue entry, sets only the Channel Disable bit of the HCCHARn register to flush requests for this channel. In the latter case, sets a flag to indicate that the host channel needs to be halted when a request queue slot is open. In DMA mode, always sets the Channel Enable and Channel Disable bits of the HCCHARn register. The controller ensures there is space in the request queue before submitting the halt request. Some time may elapse before the core flushes any posted requests for this host channel and halts. The Channel Halted interrupt handler completes the deactivation of the host channel.
Definition at line 2394 of file dwc_otg_cil.c. |
|
||||||||||||
|
Clears the transfer state for a host channel. This function is normally called after a transfer is done and the host channel is being released.
Definition at line 2521 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function does the setup for a data transfer for a host channel and starts the transfer. May be called in either Slave mode or DMA mode. In Slave mode, the caller must ensure that there is sufficient space in the request queue and Tx Data FIFO. For an OUT transfer in Slave mode, it loads a data packet into the appropriate FIFO. If necessary, additional data packets will be loaded in the Host ISR. For an IN transfer in Slave mode, a data packet is requested. The data packets are unloaded from the Rx FIFO in the Host ISR. If necessary, additional data packets are requested in the Host ISR. For a PING transfer in Slave mode, the Do Ping bit is set in the HCTSIZ register along with a packet count of 1 and the channel is enabled. This causes a single PING transaction to occur. Other fields in HCTSIZ are simply set to 0 since no data transfer occurs in this case. For a PING transfer in DMA mode, the HCTSIZ register is initialized with all the information required to perform the subsequent data transfer. In addition, the Do Ping bit is set in the HCTSIZ register. In this case, the controller performs the entire PING protocol, then starts the data transfer.
Definition at line 2703 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function continues a data transfer that was started by previous call to The caller must ensure there is sufficient space in the request queue and Tx Data FIFO. This function should only be called in Slave mode. In DMA mode, the controller acts autonomously to complete transfers programmed to a host channel. For an OUT transfer, a new data packet is loaded into the appropriate FIFO if there is any data remaining to be queued. For an IN transfer, another data packet is always requested. For the SETUP phase of a control transfer, this function does nothing.
Definition at line 2952 of file dwc_otg_cil.c. |
|
||||||||||||
|
Starts a PING transfer. This function should only be called in Slave mode. The Do Ping bit is set in the HCTSIZ register, then the channel is enabled. Definition at line 3014 of file dwc_otg_cil.c. |
|
|
This function enables the Host mode interrupts.
Definition at line 1955 of file dwc_otg_cil.c. |
|
|
This function disables the Host Mode interrupts.
Definition at line 1988 of file dwc_otg_cil.c. |
|
||||||||||||
|
This function does the setup for a data transfer for a host channel and starts the transfer in Descriptor DMA mode. Initializes HCTSIZ register. For a PING transfer the Do Ping bit is set. Sets PID and NTD values. For periodic transfers initializes SCHED_INFO field with micro-frame bitmap. Initializes HCDMA register with descriptor list address and CTD value then starts the transfer via enabling the channel.
Definition at line 2872 of file dwc_otg_cil.c. |
|
|
This function Reads HPRT0 in preparation to modify. It keeps the WC bits 0 so that if they are read as 1, they won't clear when you write it back Definition at line 1127 of file dwc_otg_cil.h. |
|
||||||||||||||||
|
This function reads a packet from the Rx FIFO into the destination buffer. To read SETUP data use dwc_otg_read_setup_packet.
Definition at line 4590 of file dwc_otg_cil.c. |
|
||||||||||||
|
Flush a Tx FIFO.
Definition at line 4959 of file dwc_otg_cil.c. |
|
|
Flush Rx FIFO.
Definition at line 4991 of file dwc_otg_cil.c. |
|
|
Do core a soft reset of the core. Be careful with this because it resets all the internal state machines of the core. Definition at line 5022 of file dwc_otg_cil.c. |
|
|
This function returns the mode of the operation, host or device.
Definition at line 1295 of file dwc_otg_cil.h. |
|
||||||||||||||||
|
Register PCD callbacks. The callbacks are used to start and stop the PCD for interrupt processing.
Definition at line 5093 of file dwc_otg_cil.c. |
|
||||||||||||||||
|
Register HCD callbacks. The callbacks are used to start and stop the HCD for interrupt processing.
Definition at line 5078 of file dwc_otg_cil.c. |
|
|
Start the HCD. Helper function for using the HCD callbacks.
Definition at line 1342 of file dwc_otg_cil.h. |
|
|
Stop the HCD. Helper function for using the HCD callbacks.
Definition at line 1353 of file dwc_otg_cil.h. |
|
|
Disconnect the HCD. Helper function for using the HCD callbacks.
Definition at line 1364 of file dwc_otg_cil.h. |
|
|
Inform the HCD the a New Session has begun. Helper function for using the HCD callbacks.
Definition at line 1376 of file dwc_otg_cil.h. |
|
|
Resume the HCD. Helper function for using the HCD callbacks.
Definition at line 1402 of file dwc_otg_cil.h. |
|
|
Start the PCD. Helper function for using the PCD callbacks.
Definition at line 1413 of file dwc_otg_cil.h. |
|
|
Stop the PCD. Helper function for using the PCD callbacks.
Definition at line 1424 of file dwc_otg_cil.h. |
|
|
Suspend the PCD. Helper function for using the PCD callbacks.
Definition at line 1435 of file dwc_otg_cil.h. |
|
|
Resume the PCD. Helper function for using the PCD callbacks.
Definition at line 1446 of file dwc_otg_cil.h. |
1.3.9.1