XMC Peripheral Library for XMC4000 Family: xmc_usbd.h File Reference

XMC Peripheral Library for XMC4000 Family

XMC Peripheral Library for XMC4000 Family  2.1.16
xmc_usbd.h File Reference
#include "xmc_common.h" #include <stdlib.h>
#include <string.h>
#include "xmc_usbd_regs.h"
#include "xmc_scu.h"
Include dependency graph for xmc_usbd.h:

Data Structures

struct  XMC_USBD_CAPABILITIES_t
 
struct  XMC_USBD_DEVICE_t
 
struct  XMC_USBD_DRIVER_t
 
struct  XMC_USBD_EP_t
 
struct  XMC_USBD_STATE_t
 
struct  XMC_USBD_t
 

Macros

#define XMC_USBD_ENDPOINT_DIRECTION_MASK   (0x80U)
 
#define XMC_USBD_ENDPOINT_MAX_PACKET_SIZE_MASK   (0x07FFU)
 
#define XMC_USBD_ENDPOINT_NUMBER_MASK   (0x0FU)
 
#define XMC_USBD_EP_DIR_MASK   (0x80U)
 
#define XMC_USBD_EP_NUM_MASK   (0x0FU)
 
#define XMC_USBD_MAX_FIFO_SIZE   (2048U)
 
#define XMC_USBD_MAX_PACKET_SIZE   (64U)
 
#define XMC_USBD_MAX_TRANSFER_SIZE_EP0   (64U)
 
#define XMC_USBD_NUM_EPS   (7U)
 
#define XMC_USBD_NUM_TX_FIFOS   (7U)
 
#define XMC_USBD_SETUP_COUNT   (3U)
 
#define XMC_USBD_SETUP_SIZE   (8U)
 
#define XMC_USBD_SPEED_FULL   (1U)
 

Typedefs

typedef void(* XMC_USBD_SignalDeviceEvent_t) (XMC_USBD_EVENT_t event)
 
typedef void(* XMC_USBD_SignalEndpointEvent_t) (uint8_t ep_addr, XMC_USBD_EP_EVENT_t ep_event)
 

Enumerations

Functions

void XMC_USBD_ClearEvent (XMC_USBD_EVENT_t event)
 
void XMC_USBD_ClearEventINEP (uint32_t event, uint8_t ep_num)
 
void XMC_USBD_ClearEventOUTEP (uint32_t event, uint8_t ep_num)
 
XMC_USBD_STATUS_t XMC_USBD_DeviceConnect (void)
 
XMC_USBD_STATUS_t XMC_USBD_DeviceDisconnect (void)
 
XMC_USBD_STATE_t XMC_USBD_DeviceGetState (const XMC_USBD_t *const obj)
 
XMC_USBD_STATUS_t XMC_USBD_DeviceSetAddress (uint8_t address, XMC_USBD_SET_ADDRESS_STAGE_t stage)
 
void XMC_USBD_Disable (void)
 
void XMC_USBD_Enable (void)
 
void XMC_USBD_EnableEventINEP (uint32_t event)
 
void XMC_USBD_EnableEventOUTEP (uint32_t event)
 
XMC_USBD_STATUS_t XMC_USBD_EndpointAbort (uint8_t ep_addr)
 
XMC_USBD_STATUS_t XMC_USBD_EndpointConfigure (uint8_t ep_addr, XMC_USBD_ENDPOINT_TYPE_t ep_type, uint16_t ep_max_packet_size)
 
int32_t XMC_USBD_EndpointRead (const uint8_t ep_addr, uint8_t *buffer, uint32_t length)
 
XMC_USBD_STATUS_t XMC_USBD_EndpointReadStart (const uint8_t ep_addr, uint32_t size)
 
XMC_USBD_STATUS_t XMC_USBD_EndpointStall (uint8_t ep_addr, bool stall)
 
XMC_USBD_STATUS_t XMC_USBD_EndpointUnconfigure (uint8_t ep_addr)
 
int32_t XMC_USBD_EndpointWrite (const uint8_t ep_addr, const uint8_t *buffer, uint32_t length)
 
XMC_USBD_CAPABILITIES_t XMC_USBD_GetCapabilities (void)
 
uint16_t XMC_USBD_GetFrameNumber (void)
 
XMC_USBD_STATUS_t XMC_USBD_Init (XMC_USBD_t *obj)
 
void XMC_USBD_IRQHandler (const XMC_USBD_t *const obj)
 
uint32_t XMC_USBD_IsEnumDone (void)
 
XMC_USBD_STATUS_t XMC_USBD_Uninitialize (void)
 

Variables

const XMC_USBD_DRIVER_t Driver_USBD0
 
XMC_USBD_DEVICE_t xmc_device
 

Detailed Description

Date
2015-06-20

XMClib v2.1.16 - XMC Peripheral Driver Library

Copyright (c) 2015-2017, Infineon Technologies AG All rights reserved.

Redistribution and use in source and binary forms, with or without modification,are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

To improve the quality of the software, users are encouraged to share modifications, enhancements or bug fixes with Infineon Technologies AG dave@.nosp@m.infi.nosp@m.neon..nosp@m.com).

Change History

2015-02-16:

  • Initial Version.
    2015-03-18:
  • Updated the doxygen comments for documentation.
  • Updated the XMC_USBD_PATCH_VERSION to 4.

2015-06-20:

  • Removed version macros and declaration of GetDriverVersion API.
  • Updated the doxygen comments for API XMC_USBD_IsEnumDone().
  • Updated the copy right in the file header.
Generated on Mon Aug 7 2017 11:33:56 for XMC Peripheral Library for XMC4000 Family by   doxygen 1.8.11