GD32F1x0
|
usb_core.c
Go to the documentation of this file.
#define _ToggleDTG_RX(EpID)
Toggle and Clear EPRX_DTG bit in the endpoint control and status register.
Definition: usb_regs.h:498
uint8_t USB_CtlTransmitStatus(USB_CORE_HANDLE *pudev)
Transmit status stage on the control pipe.
Definition: usb_core.c:609
uint8_t USB_CtlContinueTx(USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len)
Continue transmitting data on the control pipe.
Definition: usb_core.c:561
void USB_EP_ClrStall(USB_CORE_HANDLE *pudev, uint8_t EpAddr)
Clear endpoint stalled status.
Definition: usb_core.c:473
#define IER_MASK
Interrupt flag mask which decide what event should be handled by application.
Definition: usb_core.h:38
Definition: usb_core.h:212
void USB_EP_Tx(USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t *pbuf, uint16_t BufLen)
Endpoint prepare to transmit data.
Definition: usb_core.c:376
uint8_t USB_CtlTx(USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len)
Transmit data on the control pipe.
Definition: usb_core.c:543
#define _Set_Status_Out(EpID)
Set and Clear directly STATUS_OUT state of endpoint.
Definition: usb_regs.h:471
void USB_EP_Init(USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t EpType, uint16_t EpMps)
Endpoint initialization.
Definition: usb_core.c:169
void USB_EP_BufConfig(USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t EpKind, uint32_t BufAddr)
Configure buffer for endpoint.
Definition: usb_core.c:107
uint8_t USB_CtlReceiveStatus(USB_CORE_HANDLE *pudev)
Receive status stage on the control pipe.
Definition: usb_core.c:623
uint8_t USB_EP_GetStatus(USB_CORE_HANDLE *pudev, uint8_t EpAddr)
Get the endpoint status.
Definition: usb_core.c:524
uint16_t USB_GetRxCount(USB_CORE_HANDLE *pudev, uint8_t EpID)
Get the received data length.
Definition: usb_core.c:640
void FreeUserBuffer(uint8_t EpID, uint8_t Dir)
Free buffer used from application by toggling the SW_BUF byte.
Definition: usb_buf.c:36
#define _SetEPRxTxStatus(EpID, StateRx, StateTx)
Rx and Tx transfer status setting (bits EPRX_STA[1:0] & EPTX_STA[1:0])
Definition: usb_regs.h:451
Device Driver Header file.
#define _SetEPRxStatus(EpID, State)
Rx transfer status setting and getting (bits EPRX_STA[1:0])
Definition: usb_regs.h:426
void USB_EP_Stall(USB_CORE_HANDLE *pudev, uint8_t EpAddr)
Set an endpoint to STALL status.
Definition: usb_core.c:438
void USB_EP_SetAddress(USB_CORE_HANDLE *pudev, uint8_t Addr)
Set USB device and endpoints address.
Definition: usb_core.c:501
void USB_EP_DeInit(USB_CORE_HANDLE *pudev, uint8_t EpAddr)
Configure the endpoint when it is disabled.
Definition: usb_core.c:275
#define _ToggleDTG_TX(EpID)
Toggle and Clear EPTX_DTG bit in the endpoint control and status register.
Definition: usb_regs.h:507
#define _SetEPDoubleBuff(EpID)
Set and Clear directly double buffered feature of endpoint.
Definition: usb_regs.h:480
void USB_EP_Rx(USB_CORE_HANDLE *pudev, uint8_t EpAddr, uint8_t *pbuf, uint16_t BufLen)
Endpoint prepare to receive data.
Definition: usb_core.c:336
uint8_t USB_CtlRx(USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len)
Receive data on the control pipe.
Definition: usb_core.c:577
void UserCopyToBuffer(uint8_t *UsrBuf, uint16_t BufAddr, uint16_t Bytes)
Copy a buffer from user memory area to the allocation buffer area.
Definition: usb_buf.c:55
#define _SetEPDblBufAddr(EpID, Buf0Addr, Buf1Addr)
Sets a double buffer endpoint addresses.
Definition: usb_regs.h:651
uint8_t USB_CtlContinueRx(USB_CORE_HANDLE *pudev, uint8_t *pbuf, uint16_t Len)
Continue receive data on the contrl pipe.
Definition: usb_core.c:595
#define _SetEPTxStatus(EpID, State)
Tx transfer status setting and getting (bits EPTX_STA[1:0])
Definition: usb_regs.h:407
#define _SetEPType(EpID, Type)
Endpoint type setting and getting(bits EP_CTL[1:0] in endpoint control and status register) ...
Definition: usb_regs.h:391
Generated by 1.8.10