Microchip® Advanced Software Framework

udc_dfu_small.c File Reference

USB Device Controller (UDC) optimized for DFU FLIP Device.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "conf_usb.h"
#include "usb_protocol.h"
#include "udd.h"
#include "udc_desc.h"
#include "udi.h"
#include "udc.h"
#include "udi_dfu_atmel.h"

Data Structures

struct  udc_desc_t
 Structure for USB Device Configuration Descriptor. More...
 
struct  udc_string_desc_t
 USB device string descriptor Structure used to transfer ASCII strings to USB String descriptor structure. More...
 

Functions

static bool udc_iface_disable (void)
 Disables an usb device interface (UDI) This routine call the UDI corresponding to interface number. More...
 
static bool udc_iface_enable (void)
 Enables an usb device interface (UDI) This routine calls the UDI corresponding to the interface and setting number. More...
 
bool udc_process_setup (void)
 Main routine to manage the USB SETUP request. More...
 
static bool udc_req_iface (void)
 Send the SETUP interface request to UDI. More...
 
static bool udc_req_std_dev_get_configuration (void)
 Standard device request to get configuration number. More...
 
static bool udc_req_std_dev_get_descriptor (void)
 Standard device request to get descriptors about USB device. More...
 
static bool udc_req_std_dev_get_status (void)
 Standard device request to get device status. More...
 
static bool udc_req_std_dev_get_str_desc (void)
 Standard device request to get device string descriptor. More...
 
static bool udc_req_std_dev_set_address (void)
 Standard device request to set device address. More...
 
static bool udc_req_std_dev_set_configuration (void)
 Standard device request to enable a configuration. More...
 
static bool udc_reqstd (void)
 Main routine to manage the standard USB SETUP request. More...
 
void udc_reset (void)
 Reset the current configuration of the USB device, This routines can be called by UDD when a RESET on the USB line occurs. More...
 
void udc_sof_notify (void)
 To signal that a SOF is occurred. More...
 
void udc_start (void)
 Start the USB Device stack. More...
 
void udc_stop (void)
 Stop the USB Device stack. More...
 
static void udc_valid_address (void)
 Change the address of device Callback called at the end of request set address. More...
 
void udi_dfu_atmel_disable (void)
 
bool udi_dfu_atmel_enable (void)
 
bool udi_dfu_atmel_setup (void)
 

Variables

Internal variables to manage the USB device
static le16_t udc_device_status
 Device status state (see enum usb_device_status in usb_protocol.h) More...
 
static uint8_t udc_num_configuration = 0
 Device Configuration number selected by the USB host. More...
 
UDC_DESC_STORAGE usb_dev_desc_t udc_device_desc
 Pointer on the selected speed device configuration. More...
 
UDC_DESC_STORAGE udc_desc_t udc_desc_fs
 USB Device Configuration Descriptor filled for FS. More...
 

Internal structure to store the USB device main strings

#define USB_DEVICE_MANUFACTURE_NAME_SIZE   0
 USB device manufacture name storage String is allocated only if USB_DEVICE_MANUFACTURE_NAME is declared by usb application configuration. More...
 
#define USB_DEVICE_PRODUCT_NAME_SIZE   0
 USB device product name storage String is allocated only if USB_DEVICE_PRODUCT_NAME is declared by usb application configuration. More...
 
#define USB_DEVICE_SERIAL_NAME_SIZE   0
 USB device serial number storage String is allocated only if USB_DEVICE_SERIAL_NAME is declared by usb application configuration. More...
 
static UDC_DESC_STORAGE struct
udc_string_desc_t 
udc_string_desc
 
static UDC_DESC_STORAGE
usb_str_lgid_desc_t 
udc_string_desc_languageid
 Language ID of USB device (US ID by default) More...
 

void udi_dfu_atmel_disable ( void  )

Referenced by udc_iface_disable().

bool udi_dfu_atmel_enable ( void  )

Referenced by udc_iface_enable().

bool udi_dfu_atmel_setup ( void  )

Referenced by udc_req_iface().