MG32F10x Standard Peripherals Firmware Library
|
#include "mg32f10x.h"
Go to the source code of this file.
Functions | |
void | USBD_HW_ReadEP (uint8_t ep_addr, uint8_t *pbuf, uint16_t size) |
Read data from the specified endpoint. More... | |
void | USBD_HW_WriteEP (uint8_t ep_addr, const uint8_t *pdata, uint16_t len) |
Write data to the specified endpoint. More... | |
void | USBD_HW_Transmit (uint8_t ep_addr, const uint8_t *pdata, uint16_t len) |
Transmits data over an IN endpoint. More... | |
uint16_t | USBD_HW_GetRxDataCount (uint8_t ep_addr) |
Get the last received packet size of an OUT endpoint. More... | |
void | USBD_HW_ReadyToReceive (uint8_t ep_addr) |
Ready to receive from an OUT endpoint. More... | |
void | USBD_HW_SetStallEP (uint8_t ep_addr) |
Set Stall condition of a non-control endpoint. More... | |
void | USBD_HW_ClrStallEP (uint8_t ep_addr) |
Clear Stall condition of a non-control endpoint. More... | |
uint8_t | USBD_HW_IsStalled (uint8_t ep_addr) |
Get stall status of non-control endpoint. More... | |
Copyright (c) 2020 - 2023 megawin Technology (Shenzhen) Corp., Ltd All rights reserved.
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, MEGAWIN TECHNOLOGY SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
void USBD_HW_ClrStallEP | ( | uint8_t | ep_addr | ) |
Clear Stall condition of a non-control endpoint.
ep_addr | endpoint address. |
uint16_t USBD_HW_GetRxDataCount | ( | uint8_t | ep_addr | ) |
Get the last received packet size of an OUT endpoint.
ep_addr | endpoint address (eg. 0x01). |
uint8_t USBD_HW_IsStalled | ( | uint8_t | ep_addr | ) |
Get stall status of non-control endpoint.
ep_addr | endpoint address. |
void USBD_HW_ReadEP | ( | uint8_t | ep_addr, |
uint8_t * | pbuf, | ||
uint16_t | size | ||
) |
Read data from the specified endpoint.
ep_addr | specifies which endpoint read from. This value must be less than or equal to 3. |
pbuf | pointer to data buffer. |
size | length of data to be read. |
void USBD_HW_ReadyToReceive | ( | uint8_t | ep_addr | ) |
Ready to receive from an OUT endpoint.
ep_addr | endpoint address (eg. 0x01). |
void USBD_HW_SetStallEP | ( | uint8_t | ep_addr | ) |
Set Stall condition of a non-control endpoint.
ep_addr | endpoint address. |
void USBD_HW_Transmit | ( | uint8_t | ep_addr, |
const uint8_t * | pdata, | ||
uint16_t | len | ||
) |
Transmits data over an IN endpoint.
ep_addr | endpoint address (eg. 0x81). |
pdata | pointer to the buffer containing the data to be transmitted. |
len | length of data to be transmitted. |
void USBD_HW_WriteEP | ( | uint8_t | ep_addr, |
const uint8_t * | pdata, | ||
uint16_t | len | ||
) |
Write data to the specified endpoint.
ep_addr | specifies which endpoint to write. This value must be less than or equal to 3. |
pdata | pointer to the buffer containing the data to be written. |
len | length of data to be written. |