Atmel Software Framework

common/services/usb/class/dfu_flip/device/bootloader/xmega/conf/conf_usb.h File Reference

USB configuration file.

Copyright (c) 2011-2015 Atmel Corporation. All rights reserved.

#include "compiler.h"
#include "nvm.h"
#include "udi_dfu_atmel_conf.h"
#include "conf_isp.h"

Macros

#define sysclk_disable_usb   sysclk_disable_usb_opt
 
#define sysclk_enable_usb   sysclk_enable_usb_opt
 
#define sysclk_init   sysclk_init_opt
 
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL
 USB Device Configuration. More...
 
#define USB_DEVICE_MAJOR_VERSION   (BOOTLOADER_VERSION>>4)
 
#define USB_DEVICE_MINOR_VERSION   (BOOTLOADER_VERSION&0x0F)
 
#define USB_DEVICE_POWER   100
 
#define USB_DEVICE_ATTR   USB_CONFIG_ATTR_SELF_POWERED
 
#define UDC_VBUS_EVENT(b_vbus_high)
 Device speeds support Only Full speed is authorized on DFU ATMEL Because FLIP supports only full speed Also: More...
 
#define UDI_DFU_ENABLE_EXT()   true
 USB Interface Configuration. More...
 
#define UDI_DFU_DISABLE_EXT()
 
#define FLIP_PROTOCOL_VERSION   FLIP_PROTOCOL_VERSION_2
 FLIP protocol version to use. More...
 
#define UDI_DFU_SMALL_RAM
 
#define UDD_NO_SLEEP_MGR
 USB Device Driver Configuration. More...
 

Functions

void sysclk_disable_usb_opt (void)
 Disable clock for the USB module. More...
 
void sysclk_enable_usb_opt (uint8_t freq)
 Enable clock for the USB module. More...
 
void sysclk_init_opt (void)
 

#define FLIP_PROTOCOL_VERSION   FLIP_PROTOCOL_VERSION_2

FLIP protocol version to use.

#define sysclk_disable_usb   sysclk_disable_usb_opt

Referenced by udd_disable().

#define sysclk_enable_usb   sysclk_enable_usb_opt

Referenced by udd_enable().

#define sysclk_init   sysclk_init_opt

Referenced by main(), and sensor_platform_init().

#define UDC_VBUS_EVENT (   b_vbus_high)

Device speeds support Only Full speed is authorized on DFU ATMEL Because FLIP supports only full speed Also:

  • low speed is too slow (endpoint 8 Bytes)
  • high speed does not increase flash program speed
  • high speed is not supported on custom board with bad USB layout USB Device Callbacks definitions (Optional)
#define UDD_NO_SLEEP_MGR

USB Device Driver Configuration.

#define UDI_DFU_DISABLE_EXT ( )

Referenced by udi_dfu_atmel_disable().

#define UDI_DFU_ENABLE_EXT ( )    true

USB Interface Configuration.

Configuration of DFU interfaceInterface callback definition

Referenced by udi_dfu_atmel_enable().

#define UDI_DFU_SMALL_RAM
#define USB_DEVICE_ATTR   USB_CONFIG_ATTR_SELF_POWERED
#define USB_DEVICE_MAJOR_VERSION   (BOOTLOADER_VERSION>>4)
#define USB_DEVICE_MINOR_VERSION   (BOOTLOADER_VERSION&0x0F)
#define USB_DEVICE_POWER   100
#define USB_DEVICE_VENDOR_ID   USB_VID_ATMEL

USB Device Configuration.

Device definition (mandatory)

void sysclk_disable_usb_opt ( void  )

Disable clock for the USB module.

References ccp_write_io().

void sysclk_enable_usb_opt ( uint8_t  freq)

Enable clock for the USB module.

Precondition
CONFIG_USBCLK_SOURCE must be defined.
Parameters
freqThe required USB clock frequency in MHz:
  • 6 for 6 MHz
  • 48 for 48 MHz

References Assert, ccp_write_io(), sysclk_enable_module(), SYSCLK_PORT_GEN, and SYSCLK_USB.