Go to the source code of this file.
#define __packed __attribute__ ((__packed__)) |
packing keyword for GNU Compiler
Referenced by OTGD_FS_WritePacket().
#define DEVICE_MODE_ENABLED |
#define DEV_EP_TX_DIS 0x0000 |
Referenced by OTGD_FS_Dev_SetEPStatus().
#define DEV_EP_TX_STALL 0x0010 |
Referenced by OTG_DEV_SetEPTxStatus(), OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_Dev_SetEPStatus().
#define DEV_EP_TX_NAK 0x0020 |
Referenced by OTG_DEV_EP_Init(), OTGD_FS_Dev_GetEPStatus(), OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_Handle_InEP_ISR().
#define DEV_EP_TX_VALID 0x0030 |
Referenced by OTGD_FS_Dev_GetEPStatus(), OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_Handle_InEP_ISR().
#define DEV_EP_RX_DIS 0x0000 |
Referenced by OTGD_FS_Dev_SetEPStatus().
#define DEV_EP_RX_STALL 0x1000 |
Referenced by OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_Dev_SetEPStatus().
#define DEV_EP_RX_NAK 0x2000 |
Referenced by OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_Dev_SetEPStatus().
#define DEV_EP_RX_VALID 0x3000 |
Referenced by OTGD_FS_Dev_GetEPStatus(), and OTGD_FS_Dev_SetEPStatus().
#define GAHBCFG_TXFEMPTYLVL_EMPTY 1 |
#define GAHBCFG_TXFEMPTYLVL_HALFEMPTY 0 |
#define GAHBCFG_GLBINT_ENABLE 1 |
#define GAHBCFG_INT_DMA_BURST_SINGLE 0 |
#define GAHBCFG_INT_DMA_BURST_INCR 1 |
#define GAHBCFG_INT_DMA_BURST_INCR4 3 |
#define GAHBCFG_INT_DMA_BURST_INCR8 5 |
#define GAHBCFG_INT_DMA_BURST_INCR16 7 |
#define GAHBCFG_DMAENABLE 1 |
#define GAHBCFG_TXFEMPTYLVL_EMPTY 1 |
#define GAHBCFG_TXFEMPTYLVL_HALFEMPTY 0 |
#define GRXSTS_PKTSTS_IN 2 |
#define GRXSTS_PKTSTS_IN_XFER_COMP 3 |
#define GRXSTS_PKTSTS_DATA_TOGGLE_ERR 5 |
#define GRXSTS_PKTSTS_CH_HALTED 7 |
#define DEVICE_MODE 0 |
#define HOST_MODE 1 |
Referenced by IsDeviceMode(), and IsHostMode().
#define DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ 0 |
Referenced by OTGD_FS_EP0Activate().
#define DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ 1 |
Referenced by OTGD_FS_EP0Activate().
#define DSTS_ENUMSPD_LS_PHY_6MHZ 2 |
Referenced by OTGD_FS_EP0Activate().
#define DSTS_ENUMSPD_FS_PHY_48MHZ 3 |
Referenced by OTGD_FS_EP0Activate().
#define DCFG_FRAME_INTERVAL_80 0 |
Referenced by OTGD_FS_CoreInitDev().
#define DCFG_FRAME_INTERVAL_85 1 |
#define DCFG_FRAME_INTERVAL_90 2 |
#define DCFG_FRAME_INTERVAL_95 3 |
#define DEP0CTL_MPS_64 0 |
Referenced by OTGD_FS_EP0Activate().
#define DEP0CTL_MPS_32 1 |
#define DEP0CTL_MPS_16 2 |
#define DEP0CTL_MPS_8 3 |
Referenced by OTGD_FS_EP0Activate().
#define EP_SPEED_LOW 0 |
#define EP_SPEED_FULL 1 |
#define EP_SPEED_HIGH 2 |
#define EP_TYPE_CTRL 0 |
Referenced by OTGD_FS_PCD_Init().
#define EP_TYPE_ISOC 1 |
Referenced by OTGD_FS_EPStartXfer(), and OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define EP_TYPE_BULK 2 |
Referenced by OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_EPClearStall().
#define EP_TYPE_INTR 3 |
Referenced by OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_EPClearStall().
#define STS_GOUT_NAK 1 |
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define STS_DATA_UPDT 2 |
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define STS_XFER_COMP 3 |
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define STS_SETUP_COMP 4 |
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define STS_SETUP_UPDT 6 |
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
#define CLEAR_IN_EP_INTR | ( | epnum, | |
intr | |||
) |
diepint.d32=0; \ diepint.b.intr = 1; \ WRITE_REG32(&core_regs.inep_regs[epnum]->dev_in_ep_int,diepint.d32);
Referenced by OTGD_FS_Handle_InEP_ISR().
#define CLEAR_OUT_EP_INTR | ( | epnum, | |
intr | |||
) |
doepint.d32=0; \ doepint.b.intr = 1; \ WRITE_REG32(&core_regs.outep_regs[epnum]->dev_out_ep_int,doepint.d32);
Referenced by OTGD_FS_Handle_OutEP_ISR().
#define READ_REG32 | ( | reg | ) | (*(__IO uint32_t *)reg) |
Referenced by OTGD_FS_CoreInit(), OTGD_FS_CoreInitDev(), OTGD_FS_Dev_GetEPStatus(), OTGD_FS_Dev_ResetRemoteWakeup(), OTGD_FS_Dev_SetEPStatus(), OTGD_FS_Dev_SetRemoteWakeup(), OTGD_FS_EP0Activate(), OTGD_FS_EP0StartXfer(), OTGD_FS_EPActivate(), OTGD_FS_EPClearStall(), OTGD_FS_EPSetStall(), OTGD_FS_EPStartXfer(), OTGD_FS_FlushRxFifo(), OTGD_FS_FlushTxFifo(), OTGD_FS_Handle_EnumDone_ISR(), OTGD_FS_Handle_RxStatusQueueLevel_ISR(), OTGD_FS_Handle_UsbReset_ISR(), OTGD_FS_PCD_DevConnect(), OTGD_FS_PCD_DevDisconnect(), OTGD_FS_PhyInit(), OTGD_FS_ReadCoreItr(), OTGD_FS_ReadDevAllInEPItr(), OTGD_FS_ReadDevAllOutEp_itr(), OTGD_FS_ReadDevOutEP_itr(), OTGD_FS_ReadOtgItr(), and OTGD_FS_ReadPacket().
#define WRITE_REG32 | ( | reg, | |
value | |||
) | (*(__IO uint32_t *)reg = value) |
Referenced by OTGD_FS_CoreInit(), OTGD_FS_CoreInitDev(), OTGD_FS_Dev_ResetRemoteWakeup(), OTGD_FS_Dev_SetEPStatus(), OTGD_FS_Dev_SetRemoteWakeup(), OTGD_FS_EnableDevInt(), OTGD_FS_EP0Activate(), OTGD_FS_EP0StartXfer(), OTGD_FS_EPActivate(), OTGD_FS_EPClearStall(), OTGD_FS_EPDeactivate(), OTGD_FS_EPSetStall(), OTGD_FS_EPStartXfer(), OTGD_FS_FlushRxFifo(), OTGD_FS_FlushTxFifo(), OTGD_FS_Handle_EarlySuspend_ISR(), OTGD_FS_Handle_EnumDone_ISR(), OTGD_FS_Handle_EOPF_ISR(), OTGD_FS_Handle_EPMismatch_ISR(), OTGD_FS_Handle_IncomplIsoIn_ISR(), OTGD_FS_Handle_IncomplIsoOut_ISR(), OTGD_FS_Handle_IsoOutDrop_ISR(), OTGD_FS_Handle_ModeMismatch_ISR(), OTGD_FS_Handle_Sof_ISR(), OTGD_FS_Handle_UsbReset_ISR(), OTGD_FS_Handle_USBSuspend_ISR(), OTGD_FS_Handle_Wakeup_ISR(), OTGD_FS_PCD_DevConnect(), OTGD_FS_PCD_DevDisconnect(), OTGD_FS_PCD_EP0_OutStart(), OTGD_FS_PhyInit(), and OTGD_FS_WritePacket().
#define MODIFY_REG32 | ( | reg, | |
clear_mask, | |||
set_mask | |||
) | WRITE_REG32(reg, (((READ_REG32(reg)) & ~clear_mask) | set_mask ) ) |
Referenced by OTGD_FS_CoreInitDev(), OTGD_FS_DisableGlobalInt(), OTGD_FS_EnableDevInt(), OTGD_FS_EnableGlobalInt(), OTGD_FS_EP0Activate(), OTGD_FS_EP0StartXfer(), OTGD_FS_EPActivate(), OTGD_FS_EPDeactivate(), OTGD_FS_EPStartXfer(), OTGD_FS_Handle_EarlySuspend_ISR(), OTGD_FS_Handle_EOPF_ISR(), OTGD_FS_Handle_InEP_ISR(), OTGD_FS_Handle_NPTxFE_ISR(), OTGD_FS_Handle_RxStatusQueueLevel_ISR(), OTGD_FS_Handle_UsbReset_ISR(), and OTGD_FS_PCD_EP_SetAddress().
#define _OTGD_FS_GATE_PHYCLK *(__IO uint32_t*)(0x50000E00) = 0x03 |
#define _OTGD_FS_UNGATE_PHYCLK *(__IO uint32_t*)(0x50000E00) = 0x00 |
typedef struct USB_OTG_hc USB_OTG_HC |
typedef struct USB_OTG_hc * PUSB_OTG_HC |
typedef struct USB_OTG_ep USB_OTG_EP |
typedef struct USB_OTG_ep * PUSB_OTG_EP |
enum USB_OTG_Status |
USB_OTG_Status OTGD_FS_CoreInit | ( | void | ) |
References _USB_OTG_usb_cfg_data::b, USB_OTG_core_regs::common_regs, _USB_OTG_usb_cfg_data::d32, OTGD_FS_PhyInit(), _USB_OTG_usb_cfg_data::physel, READ_REG32, _USB_OTG_common_regs::usb_cfg, USB_OTG_OK, and WRITE_REG32.
Referenced by OTG_DEV_Init().
USB_OTG_Status OTGD_FS_SetAddress | ( | uint32_t | BaseAddress | ) |
References USB_OTG_core_regs::common_regs, USB_OTG_core_regs::data_fifo, USB_OTG_core_regs::dev_regs, USB_OTG_core_regs::hc_regs, USB_OTG_core_regs::host_regs, USB_OTG_core_regs::hprt0, USB_OTG_core_regs::inep_regs, MAX_EPS_CHANNELS, USB_OTG_core_regs::outep_regs, USB_OTG_core_regs::pcgcctl, USB_OTG_CHAN_REGS_OFFSET, USB_OTG_CORE_GLOBAL_REGS_OFFSET, USB_OTG_DATA_FIFO_OFFSET, USB_OTG_DATA_FIFO_SIZE, USB_OTG_DEV_GLOBAL_REG_OFFSET, USB_OTG_DEV_IN_EP_REG_OFFSET, USB_OTG_DEV_OUT_EP_REG_OFFSET, USB_OTG_EP_REG_OFFSET, USB_OTG_HOST_CHAN_REGS_OFFSET, USB_OTG_HOST_GLOBAL_REG_OFFSET, USB_OTG_HOST_PORT_REGS_OFFSET, USB_OTG_OK, and USB_OTG_PCGCCTL_OFFSET.
Referenced by OTG_DEV_Init().
USB_OTG_Status OTGD_FS_EnableGlobalInt | ( | void | ) |
USB_OTG_Status OTGD_FS_DisableGlobalInt | ( | void | ) |
USB_OTG_Status USB_OTG_CoreInitHost | ( | void | ) |
USB_OTG_Status USB_OTG_EnableHostInt | ( | void | ) |
USB_OTG_Status USB_OTG_DisableHostInt | ( | void | ) |
References __IO, USB_OTG_core_regs::data_fifo, and READ_REG32.
Referenced by OTGD_FS_Handle_RxStatusQueueLevel_ISR().
USB_OTG_Status OTGD_FS_WritePacket | ( | uint8_t * | src, |
uint8_t | ch_ep_num, | ||
uint16_t | bytes | ||
) |
References __IO, __packed, USB_OTG_core_regs::data_fifo, USB_OTG_OK, and WRITE_REG32.
USB_OTG_Status USB_OTG_HcInit | ( | USB_OTG_HC * | hc | ) |
USB_OTG_Status USB_OTG_StartXfer | ( | USB_OTG_HC * | hc | ) |
uint32_t USB_OTG_ResetPort | ( | void | ) |
uint32_t USB_OTG_ReadHPRT0 | ( | void | ) |
uint32_t OTGD_FS_ReadDevAllInEPItr | ( | void | ) |
References _USB_OTG_dev_regs::dev_all_int, _USB_OTG_dev_regs::dev_all_int_msk, USB_OTG_core_regs::dev_regs, and READ_REG32.
Referenced by OTGD_FS_Handle_InEP_ISR().
uint32_t OTGD_FS_ReadCoreItr | ( | void | ) |
References USB_OTG_core_regs::common_regs, _USB_OTG_common_regs::int_msk, _USB_OTG_common_regs::int_sts, and READ_REG32.
Referenced by STM32_PCD_OTG_ISR_Handler().
uint32_t OTGD_FS_ReadOtgItr | ( | void | ) |
References USB_OTG_core_regs::common_regs, _USB_OTG_common_regs::otg_int, and READ_REG32.
uint32_t USB_OTG_ReadHostAllChannels_intr | ( | void | ) |
uint8_t IsDeviceMode | ( | void | ) |
References HOST_MODE.
Referenced by STM32_PCD_OTG_ISR_Handler().
USB_OTG_Status USB_OTG_HcHalt | ( | uint8_t | hc_num | ) |
USB_OTG_Status OTGD_FS_FlushTxFifo | ( | uint32_t | num | ) |
References __IO, USB_OTG_core_regs::common_regs, _USB_OTG_rst_ctl_data::d32, NutMicroDelay(), READ_REG32, _USB_OTG_common_regs::rst_ctl, USB_OTG_OK, and WRITE_REG32.
Referenced by OTGD_FS_CoreInitDev(), OTGD_FS_Handle_UsbReset_ISR(), and OTGD_FS_PCD_EP_Flush().
USB_OTG_Status OTGD_FS_FlushRxFifo | ( | void | ) |
References __IO, USB_OTG_core_regs::common_regs, _USB_OTG_rst_ctl_data::d32, NutMicroDelay(), READ_REG32, _USB_OTG_common_regs::rst_ctl, USB_OTG_OK, and WRITE_REG32.
Referenced by OTGD_FS_CoreInitDev(), and OTGD_FS_PCD_EP_Flush().
USB_OTG_Status OTGD_FS_SetHostMode | ( | void | ) |
USB_OTG_Status OTGD_FS_PhyInit | ( | void | ) |
References _USB_OTG_usb_cfg_data::b, _USB_OTG_gpio_data::b, USB_OTG_core_regs::common_regs, _USB_OTG_usb_cfg_data::d32, _USB_OTG_gpio_data::d32, _USB_OTG_common_regs::gpio, _USB_OTG_gpio_data::i2cifen, NutSleep(), _USB_OTG_usb_cfg_data::otgutmifssel, _USB_OTG_gpio_data::pwdn, READ_REG32, _USB_OTG_common_regs::usb_cfg, USB_OTG_OK, _USB_OTG_gpio_data::vbussensingB, and WRITE_REG32.
Referenced by OTGD_FS_CoreInit().
USB_OTG_Status USB_OTG_HcStartXfer | ( | USB_OTG_HC * | hc | ) |
USB_OTG_Status OTGD_FS_CoreInitDev | ( | void | ) |
References _USB_OTG_fifo_size_data::b, _USB_OTG_dev_cfg_data::b, _USB_OTG_dev_in_ep_int_data::b, _USB_OTG_dev_ep_ctl_data::b, USB_OTG_core_regs::common_regs, _USB_OTG_fifo_size_data::d32, _USB_OTG_dev_cfg_data::d32, _USB_OTG_dev_in_ep_int_data::d32, _USB_OTG_dev_ep_ctl_data::d32, DCFG_FRAME_INTERVAL_80, _USB_OTG_fifo_size_data::depth, _USB_OTG_dev_regs::dev_all_int, _USB_OTG_dev_regs::dev_all_int_msk, _USB_OTG_dev_regs::dev_cfg, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_in_ep_regs::dev_in_ep_int, _USB_OTG_dev_regs::dev_in_ep_msk, _USB_OTG_dev_in_ep_regs::dev_in_ep_txfer_siz, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_int, _USB_OTG_dev_regs::dev_out_ep_msk, _USB_OTG_dev_out_ep_regs::dev_out_ep_txfer_siz, _USB_OTG_common_regs::dev_p_tx_fsiz_dieptxf, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_ep_ctl_data::epdis, _USB_OTG_dev_ep_ctl_data::epena, USB_OTG_core_regs::inep_regs, MAX_TX_FIFOS, MODIFY_REG32, _USB_OTG_common_regs::np_tx_fifo_siz, OTGD_FS_EnableDevInt(), OTGD_FS_FlushRxFifo(), OTGD_FS_FlushTxFifo(), USB_OTG_core_regs::outep_regs, USB_OTG_core_regs::pcgcctl, _USB_OTG_dev_cfg_data::perfrint, READ_REG32, _USB_OTG_common_regs::rx_fifo_siz, RX_FIFO_SIZE, _USB_OTG_dev_ep_ctl_data::snak, _USB_OTG_fifo_size_data::startaddr, TX0_FIFO_SIZE, TX1_FIFO_SIZE, TX3_FIFO_SIZE, _USB_OTG_dev_in_ep_int_data::txfifoundrn, USB_OTG_OK, and WRITE_REG32.
Referenced by OTG_DEV_Init().
USB_OTG_Status OTGD_FS_EnableDevInt | ( | void | ) |
References _USB_OTG_int_msk_data::b, USB_OTG_core_regs::common_regs, _USB_OTG_int_msk_data::d32, _USB_OTG_int_msk_data::disconnect, _USB_OTG_int_msk_data::enumdone, _USB_OTG_int_msk_data::eopframe, _USB_OTG_int_msk_data::epmismatch, _USB_OTG_int_msk_data::erlysuspend, _USB_OTG_int_msk_data::ginnakeff, _USB_OTG_int_msk_data::goutnakeff, _USB_OTG_int_msk_data::incomplisoin, _USB_OTG_int_msk_data::incomplisoout, _USB_OTG_int_msk_data::inepintr, _USB_OTG_common_regs::int_msk, _USB_OTG_common_regs::int_sts, _USB_OTG_int_msk_data::isooutdrop, _USB_OTG_int_msk_data::modemismatch, MODIFY_REG32, _USB_OTG_int_msk_data::nptxfempty, _USB_OTG_int_msk_data::outepintr, _USB_OTG_int_msk_data::rxstsqlvl, _USB_OTG_int_msk_data::sofintr, USB_OTG_OK, _USB_OTG_int_msk_data::usbreset, _USB_OTG_int_msk_data::usbsuspend, _USB_OTG_int_msk_data::wkupintr, and WRITE_REG32.
Referenced by OTGD_FS_CoreInitDev().
USB_OTG_Status OTGD_FS_EP0Activate | ( | void | ) |
References _USB_OTG_dev_ctl_data::b, _USB_OTG_dev_sts_data::b, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ctl_data::cgnpinnak, _USB_OTG_dev_ctl_data::d32, _USB_OTG_dev_sts_data::d32, _USB_OTG_dev_ep_ctl_data::d32, DEP0CTL_MPS_64, DEP0CTL_MPS_8, _USB_OTG_dev_regs::dev_ctl, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_regs::dev_sts, DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ, DSTS_ENUMSPD_FS_PHY_48MHZ, DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ, DSTS_ENUMSPD_LS_PHY_6MHZ, _USB_OTG_dev_sts_data::enumspd, USB_OTG_core_regs::inep_regs, MODIFY_REG32, _USB_OTG_dev_ep_ctl_data::mps, READ_REG32, USB_OTG_OK, and WRITE_REG32.
Referenced by OTGD_FS_Handle_EnumDone_ISR().
USB_OTG_Status OTGD_FS_EPActivate | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_all_int_data::d32, _USB_OTG_dev_ep_ctl_data::d32, _USB_OTG_dev_regs::dev_all_int_msk, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_all_int_data::ep, _USB_OTG_dev_ep_ctl_data::eptype, _USB_OTG_dev_all_int_data::in, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::maxpacket, MODIFY_REG32, _USB_OTG_dev_ep_ctl_data::mps, USB_OTG_ep::num, _USB_OTG_dev_all_int_data::out, USB_OTG_core_regs::outep_regs, READ_REG32, _USB_OTG_dev_ep_ctl_data::setd0pid, USB_OTG_ep::tx_fifo_num, _USB_OTG_dev_ep_ctl_data::txfnum, USB_OTG_ep::type, USB_OTG_OK, _USB_OTG_dev_ep_ctl_data::usbactep, and WRITE_REG32.
Referenced by OTGD_FS_PCD_EP_Open().
USB_OTG_Status OTGD_FS_EPDeactivate | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_all_int_data::d32, _USB_OTG_dev_ep_ctl_data::d32, _USB_OTG_dev_regs::dev_all_int_msk, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_all_int_data::ep, _USB_OTG_dev_all_int_data::in, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, MODIFY_REG32, USB_OTG_ep::num, _USB_OTG_dev_all_int_data::out, USB_OTG_core_regs::outep_regs, USB_OTG_OK, _USB_OTG_dev_ep_ctl_data::usbactep, and WRITE_REG32.
Referenced by OTGD_FS_PCD_EP_Close().
USB_OTG_Status OTGD_FS_EPStartXfer | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_txfer_siz_data::b, _USB_OTG_dev_ep_txfer_siz_data::d32, _USB_OTG_dev_regs::dev_fifo_empty_msk, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_in_ep_regs::dev_in_ep_txfer_siz, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_txfer_siz, USB_OTG_core_regs::dev_regs, EP_TYPE_ISOC, USB_OTG_ep::even_odd_frame, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::maxpacket, MODIFY_REG32, USB_OTG_ep::num, USB_OTG_core_regs::outep_regs, _USB_OTG_dev_ep_txfer_siz_data::pktcnt, READ_REG32, USB_OTG_ep::type, USB_OTG_OK, WRITE_REG32, USB_OTG_ep::xfer_len, and _USB_OTG_dev_ep_txfer_siz_data::xfersize.
Referenced by OTG_DEV_EP_Init(), OTG_DEV_Init(), OTGD_FS_PCD_EP_Read(), and OTGD_FS_PCD_EP_Write().
USB_OTG_Status OTGD_FS_EP0StartXfer | ( | USB_OTG_EP * | ep | ) |
References _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ep_txfer_size0_data::b, _USB_OTG_dev_ep_ctl_data::cnak, _USB_OTG_dev_ep_ctl_data::d32, _USB_OTG_dev_ep_txfer_size0_data::d32, _USB_OTG_dev_regs::dev_fifo_empty_msk, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_in_ep_regs::dev_in_ep_txfer_siz, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_txfer_siz, USB_OTG_core_regs::dev_regs, _USB_OTG_dev_ep_ctl_data::epena, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::maxpacket, MODIFY_REG32, USB_OTG_ep::num, USB_OTG_core_regs::outep_regs, _USB_OTG_dev_ep_txfer_size0_data::pktcnt, READ_REG32, USB_OTG_OK, WRITE_REG32, USB_OTG_ep::xfer_len, and _USB_OTG_dev_ep_txfer_size0_data::xfersize.
Referenced by OTGD_FS_PCD_EP_Read(), OTGD_FS_PCD_EP_Write(), Post0_Process(), and Setup0_Process().
USB_OTG_Status OTGD_FS_EPSetStall | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ep_ctl_data::d32, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, _USB_OTG_dev_ep_ctl_data::epdis, _USB_OTG_dev_ep_ctl_data::epena, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::num, USB_OTG_core_regs::outep_regs, READ_REG32, _USB_OTG_dev_ep_ctl_data::stall, USB_OTG_OK, and WRITE_REG32.
Referenced by OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_PCD_EP_Stall().
USB_OTG_Status OTGD_FS_EPClearStall | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ep_ctl_data::d32, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, EP_TYPE_BULK, EP_TYPE_INTR, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::num, USB_OTG_core_regs::outep_regs, READ_REG32, _USB_OTG_dev_ep_ctl_data::setd0pid, _USB_OTG_dev_ep_ctl_data::stall, USB_OTG_ep::type, USB_OTG_OK, and WRITE_REG32.
Referenced by OTGD_FS_Dev_SetEPStatus(), and OTGD_FS_PCD_EP_ClrStall().
uint32_t OTGD_FS_ReadDevAllOutEp_itr | ( | void | ) |
References _USB_OTG_dev_regs::dev_all_int, _USB_OTG_dev_regs::dev_all_int_msk, USB_OTG_core_regs::dev_regs, and READ_REG32.
Referenced by OTGD_FS_Handle_OutEP_ISR().
uint32_t OTGD_FS_ReadDevOutEP_itr | ( | USB_OTG_EP * | ep | ) |
uint32_t OTGD_FS_Dev_GetEPStatus | ( | USB_OTG_EP * | ep | ) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ep_ctl_data::d32, DEV_EP_RX_NAK, DEV_EP_RX_STALL, DEV_EP_RX_VALID, DEV_EP_TX_NAK, DEV_EP_TX_STALL, DEV_EP_TX_VALID, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, _USB_OTG_dev_ep_ctl_data::naksts, USB_OTG_ep::num, USB_OTG_core_regs::outep_regs, READ_REG32, and _USB_OTG_dev_ep_ctl_data::stall.
Referenced by OTG_DEV_GetEPRxStatus(), and OTG_DEV_GetEPTxStatus().
void OTGD_FS_Dev_SetEPStatus | ( | USB_OTG_EP * | ep, |
uint32_t | Status | ||
) |
References __IO, _USB_OTG_dev_ep_ctl_data::b, _USB_OTG_dev_ep_ctl_data::cnak, _USB_OTG_dev_ep_ctl_data::d32, DEV_EP_RX_DIS, DEV_EP_RX_NAK, DEV_EP_RX_STALL, DEV_EP_RX_VALID, DEV_EP_TX_DIS, DEV_EP_TX_NAK, DEV_EP_TX_STALL, DEV_EP_TX_VALID, _USB_OTG_dev_in_ep_regs::dev_in_ep_ctl, _USB_OTG_dev_out_ep_regs::dev_out_ep_ctl, EP_TYPE_BULK, EP_TYPE_INTR, _USB_OTG_dev_ep_ctl_data::epena, USB_OTG_ep::even_odd_frame, USB_OTG_core_regs::inep_regs, USB_OTG_ep::is_in, USB_OTG_ep::num, OTGD_FS_EPClearStall(), OTGD_FS_EPSetStall(), USB_OTG_core_regs::outep_regs, READ_REG32, _USB_OTG_dev_ep_ctl_data::setd0pid, _USB_OTG_dev_ep_ctl_data::snak, _USB_OTG_dev_ep_ctl_data::stall, USB_OTG_ep::type, _USB_OTG_dev_ep_ctl_data::usbactep, and WRITE_REG32.
Referenced by OTG_DEV_SetEPRxStatus(), and OTG_DEV_SetEPTxStatus().
void OTGD_FS_Dev_SetRemoteWakeup | ( | void | ) |
References __IO, _USB_OTG_dev_ctl_data::b, _USB_OTG_dev_ctl_data::d32, _USB_OTG_dev_regs::dev_ctl, USB_OTG_core_regs::dev_regs, READ_REG32, _USB_OTG_dev_ctl_data::rmtwkupsig, and WRITE_REG32.
Referenced by Resume().
void OTGD_FS_Dev_ResetRemoteWakeup | ( | void | ) |
References __IO, _USB_OTG_dev_ctl_data::b, _USB_OTG_dev_ctl_data::d32, _USB_OTG_dev_regs::dev_ctl, USB_OTG_core_regs::dev_regs, READ_REG32, _USB_OTG_dev_ctl_data::rmtwkupsig, and WRITE_REG32.
Referenced by Resume().