Atmel Software Framework

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Standard requests defines

Macros

#define BUS_POWERED   0
 
#define CLEAR_FEATURE   0x01
 
#define CONFIGURATION_DESCRIPTOR   0x02
 
#define DEVICE_DESCRIPTOR   0x01
 
#define DEVICE_QUALIFIER_DESCRIPTOR   0x06
 
#define DEVICE_TYPE   0x00
 
#define ENDPOINT_DESCRIPTOR   0x05
 
#define ENDPOINT_TYPE   0x02
 
#define FEATURE_DEVICE_REMOTE_WAKEUP   0x01
 
#define FEATURE_ENDPOINT_HALT   0x00
 
#define FEATURE_TEST_MODE   0x02
 
#define GET_CONFIGURATION   0x08
 
#define GET_CONFIGURATION_DESCRIPTOR   4
 
#define Get_desc_ep_dir(ep_addr)   (Rd_bitfield(ep_addr, MSK_EP_DIR))
 Extract endpoint direction from endpoint address in endpoint descriptor. More...
 
#define Get_desc_ep_nbr(ep_addr)   (Rd_bitfield(ep_addr, MSK_EP_NBR))
 Extract endpoint number from endpoint address in endpoint descriptor. More...
 
#define GET_DESCRIPTOR   0x06
 
#define GET_DEVICE   0x01
 
#define GET_DEVICE_DESCRIPTOR   1
 
#define GET_INTERFACE   0x0A
 
#define GET_STATUS   0x00
 
#define GET_STRING   0x03
 
#define INTERFACE_DESCRIPTOR   0x04
 
#define INTERFACE_TYPE   0x01
 
#define MSK_EP_DIR   0x80
 
#define MSK_EP_NBR   0x0F
 
#define OTHER_SPEED_CONFIGURATION_DESCRIPTOR   0x07
 
#define REQUEST_DEVICE_STATUS   0x80
 
#define REQUEST_ENDPOINT_STATUS   0x82
 
#define REQUEST_INTERFACE_STATUS   0x81
 
#define SELF_POWERED   1
 
#define SET_ADDRESS   0x05
 
#define SET_CONFIGURATION   0x09
 
#define SET_DESCRIPTOR   0x07
 
#define SET_FEATURE   0x03
 
#define SET_INTERFACE   0x0B
 
#define STRING_DESCRIPTOR   0x03
 
#define SYNCH_FRAME   0x0C
 
#define TEST_FORCE_ENABLE   0x05
 
#define TEST_J   0x01
 
#define TEST_K   0x02
 
#define TEST_PACKET   0x04
 
#define TEST_SE0_NAK   0x03
 
#define USB_DEV_STATUS_REMOTEWAKEUP   2
 
#define Usb_format_mcu_to_usb_data(width, data)   (TPASTE2(Swap, width)(data))
 Convert 16-, 32- or 64-bit data between MCU and USB endianisms. More...
 
#define Usb_format_usb_to_mcu_data(width, data)   (TPASTE2(Swap, width)(data))
 
#define usb_format_mcu_to_usb_data(width, data)   (TPASTE2(swap, width)(data))
 
#define usb_format_usb_to_mcu_data(width, data)   (TPASTE2(swap, width)(data))
 

#define BUS_POWERED   0
#define CLEAR_FEATURE   0x01

Referenced by usb_process_request().

#define CONFIGURATION_DESCRIPTOR   0x02
#define DEVICE_DESCRIPTOR   0x01
#define DEVICE_QUALIFIER_DESCRIPTOR   0x06

Referenced by usb_get_descriptor().

#define DEVICE_TYPE   0x00

Referenced by usb_set_feature().

#define ENDPOINT_DESCRIPTOR   0x05
#define ENDPOINT_TYPE   0x02

Referenced by usb_set_feature().

#define FEATURE_DEVICE_REMOTE_WAKEUP   0x01
#define FEATURE_ENDPOINT_HALT   0x00
#define FEATURE_TEST_MODE   0x02

Referenced by usb_set_feature().

#define GET_CONFIGURATION   0x08

Referenced by usb_process_request().

#define GET_CONFIGURATION_DESCRIPTOR   4
#define Get_desc_ep_dir (   ep_addr)    (Rd_bitfield(ep_addr, MSK_EP_DIR))

Extract endpoint direction from endpoint address in endpoint descriptor.

Parameters
ep_addrU8: Endpoint address
Returns
U8: Endpoint direction
#define Get_desc_ep_nbr (   ep_addr)    (Rd_bitfield(ep_addr, MSK_EP_NBR))

Extract endpoint number from endpoint address in endpoint descriptor.

Parameters
ep_addrU8: Endpoint address
Returns
U8: Endpoint number

Referenced by host_check_class(), usb_clear_feature(), usb_get_status(), and usb_set_feature().

#define GET_DESCRIPTOR   0x06
#define GET_DEVICE   0x01
#define GET_DEVICE_DESCRIPTOR   1
#define GET_INTERFACE   0x0A

Referenced by usb_process_request().

#define GET_STATUS   0x00

Referenced by usb_process_request().

#define GET_STRING   0x03
#define INTERFACE_DESCRIPTOR   0x04
#define INTERFACE_TYPE   0x01
#define MSK_EP_DIR   0x80
#define MSK_EP_NBR   0x0F
#define OTHER_SPEED_CONFIGURATION_DESCRIPTOR   0x07

Referenced by usb_get_descriptor().

#define REQUEST_DEVICE_STATUS   0x80

Referenced by usb_get_status().

#define REQUEST_ENDPOINT_STATUS   0x82

Referenced by usb_get_status().

#define REQUEST_INTERFACE_STATUS   0x81

Referenced by usb_get_status().

#define SELF_POWERED   1
#define SET_ADDRESS   0x05

Referenced by usb_process_request().

#define SET_CONFIGURATION   0x09
#define SET_DESCRIPTOR   0x07
#define SET_FEATURE   0x03

Referenced by usb_process_request().

#define SET_INTERFACE   0x0B

Referenced by usb_process_request().

#define STRING_DESCRIPTOR   0x03

Referenced by usb_user_get_descriptor().

#define SYNCH_FRAME   0x0C

Referenced by usb_process_request().

#define TEST_FORCE_ENABLE   0x05

Referenced by usb_set_feature().

#define TEST_J   0x01

Referenced by usb_set_feature().

#define TEST_K   0x02

Referenced by usb_set_feature().

#define TEST_PACKET   0x04

Referenced by usb_set_feature().

#define TEST_SE0_NAK   0x03

Referenced by usb_set_feature().

#define USB_DEV_STATUS_REMOTEWAKEUP   2
#define Usb_format_mcu_to_usb_data (   width,
  data 
)    (TPASTE2(Swap, width)(data))

Convert 16-, 32- or 64-bit data between MCU and USB endianisms.

Depending on MCU endianism, swap or not data bytes.

Parameters
widthData width in bits: 16, 32 or 64
data16-, 32- or 64-bit data to format
Returns
Formatted 16-, 32- or 64-bit data

Referenced by audio_micro_get_vol_max(), audio_micro_get_vol_min(), audio_micro_get_vol_res(), audio_speaker_get_vol_cur(), audio_speaker_get_vol_max(), audio_speaker_get_vol_min(), and audio_speaker_get_vol_res().

#define usb_format_mcu_to_usb_data (   width,
  data 
)    (TPASTE2(swap, width)(data))
#define Usb_format_usb_to_mcu_data (   width,
  data 
)    (TPASTE2(Swap, width)(data))