Atmel Software Framework

avr32/services/usb/_asf_v1/class/audio/examples/device/conf_usb.h File Reference

USB configuration file.

This file contains the possible external configuration of the USB.

Copyright (c) 2009 Atmel Corporation. All rights reserved.

#include "compiler.h"
#include "board.h"
#include "print_funcs.h"
#include "usb_ids.h"

Macros

#define CLASS_SUBCLASS_PROTOCOL
 CLASS/SUBCLASS/PROTOCOL supported table list. More...
 
#define DEVICE_ADDRESS   0x05
 The address that will be assigned to the connected device. More...
 
#define EP_AUDIO_IN   6
 
#define EP_AUDIO_OUT   5
 
#define EP_KBD_IN   1
 
#define HOST_AUTO_CFG_ENDPOINT   ENABLE
 Try to configure the host pipe according to the device descriptors received. More...
 
#define HOST_CONTINUOUS_SOF_INTERRUPT   DISABLE
 Host Start-of-Frame interrupt always enabled. More...
 
#define Host_device_class_not_supported_action()
 
#define Host_device_connection_action()
 
#define Host_device_disconnection_action()   (audio_new_device_connected = false, audio_connected = false, host_user_check_class_init() )
 
#define Host_device_error_action()
 
#define Host_device_not_supported_action()
 
#define Host_device_supported_action()
 
#define HOST_ERROR_RESTART   ENABLE
 When host error state detected, go to detached state. More...
 
#define Host_hwup_action()
 
#define Host_new_device_connection_action()   (audio_new_device_connected = true)
 
#define Host_sof_action()   host_sof_action()
 
#define HOST_STRICT_VID_PID_TABLE   DISABLE
 The host controller will be limited to the strict VID/PID list. More...
 
#define Host_suspend_action()
 
#define Host_user_check_class_action(x)   (host_user_check_class(x))
 During the verification of the device class by the host (after device enumeration), this call-back function allows to look more deeply into the configuration descriptor. More...
 
#define ID_PIN_CHANGE_GENERATE_RESET   ENABLE
 Force CPU reset upon ID pin change. More...
 
#define LOG_STR(str)
 Debug trace macro. More...
 
#define MAX_EP_PER_INTERFACE   2
 The maximal number of endpoints per interface supported. More...
 
#define MAX_INTERFACE_SUPPORTED   0x08
 The maximal number of interfaces that can be supported (composite device) More...
 
#define NAK_RECEIVE_TIMEOUT   0x0FFF
 Number of NAK handshakes before time-out for receive functions (up to 0xFFFF) More...
 
#define NAK_SEND_TIMEOUT   0x0FFF
 Number of NAK handshakes before time-out for transmit functions (up to 0xFFFF) More...
 
#define NAK_TIMEOUT_ENABLE   DISABLE
 Enable cpt NAK time-out for host transfer. More...
 
#define NB_ENDPOINTS   4
 
#define PIPE_AUDIO_IN   pipe_audio_in
 
#define SIZEOF_DATA_STAGE   1024
 The size of RAM buffer reserved for descriptor handling. More...
 
#define TIMEOUT_DELAY   10
 Delay 1/4 s (250 ms) before time-out value. More...
 
#define TIMEOUT_DELAY_ENABLE   ENABLE
 Enable time-out delay for host transfer. More...
 
#define TIMER_USB_STREAM_MONITOR   700
 Period (in ms) of the polling of the buffers monitoring. More...
 
#define USB_DEVICE_FEATURE   true
 ENABLE to activate the device software framework support. More...
 
#define USB_HOST_FEATURE   true
 ENABLE to activate the host software framework support. More...
 
#define USB_HOST_FULLSPEED_ONLY
 
#define USB_HOST_PIPE_INTERRUPT_TRANSFER   DISABLE
 USB host pipes transfers use USB communication interrupt (allows to use non-blocking functions) More...
 
#define Usb_id_transition_action()
 
#define USB_INT_LEVEL   AVR32_INTC_INT0
 USB interrupt priority level. More...
 
#define Usb_reset_action()
 
#define Usb_resume_action()
 
#define USB_RESYNC_AUDIO_STREAM   true
 ENABLE to activate the USB audio resynchronization. More...
 
#define Usb_set_configuration_action()   Usb_enable_sof_interrupt()
 
#define Usb_sof_action()   usb_sof_action()
 
#define USB_STREAM_BUFFER_NUMBER   16
 Number of buffers used in the USB stream FIFO. More...
 
#define USB_STREAM_BUFFER_SIZE   256
 Size of a buffer (in bytes) used in the USB stream FIFO. More...
 
#define USB_STREAM_RESYNC_PPM_STEPS   10
 Steps in PPM for the resynchronization. More...
 
#define Usb_suspend_action()
 
#define Usb_vbus_off_action()
 
#define Usb_vbus_on_action()
 
#define Usb_wake_up_action()
 
#define USE_USB_PADS_REGULATOR   DISABLE
 Enable the internal regulator for USB pads. More...
 
#define User_configure_endpoint()
 If no auto configuration of EP, map here user function. More...
 
#define VID_PID_TABLE   {ATMEL_VID, 1, AUDIO_MIC_EXAMPLE_PID}
 VID/PID supported table list. More...
 

Functions

void host_sof_action (void)
 host_sof_action More...
 
void host_suspend_action (void)
 
bool host_user_check_class (const uint8_t *descriptor)
 This function is called by the standard USB host_check_class() function when the Host is analyzing the configuration descriptor previously sent by a USB Device. More...
 
void host_user_check_class_init (void)
 Initialization. More...
 
void usb_sof_action (void)
 usb_sof_action More...
 
void usb_suspend_action (void)
 

Variables

volatile bool audio_connected
 
volatile bool audio_new_device_connected
 
uint8_t pipe_audio_in