Standard requests defines
[USB task entry point module]

#define usb_format_mcu_to_usb_data(width, data)   (TPASTE2(swap, width)(data))
#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.
#define usb_format_usb_to_mcu_data(width, data)   (TPASTE2(swap, width)(data))
#define Usb_format_usb_to_mcu_data(width, data)   (TPASTE2(Swap, width)(data))

Defines

#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.
#define Get_desc_ep_nbr(ep_addr)   (Rd_bitfield(ep_addr, MSK_EP_NBR))
 Extract endpoint number from endpoint address in endpoint descriptor.
#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 Documentation

#define BUS_POWERED   0

Definition at line 151 of file usb_task.h.

#define CLEAR_FEATURE   0x01

Definition at line 107 of file usb_task.h.

Referenced by usb_process_request().

#define CONFIGURATION_DESCRIPTOR   0x02

Definition at line 131 of file usb_task.h.

Referenced by host_check_class(), usb_get_descriptor(), and usb_set_interface().

#define DEVICE_DESCRIPTOR   0x01

Definition at line 130 of file usb_task.h.

Referenced by usb_get_descriptor().

#define DEVICE_QUALIFIER_DESCRIPTOR   0x06

Definition at line 135 of file usb_task.h.

Referenced by usb_get_descriptor().

#define DEVICE_TYPE   0x00

Definition at line 125 of file usb_task.h.

Referenced by usb_clear_feature(), and usb_set_feature().

#define ENDPOINT_DESCRIPTOR   0x05

Definition at line 134 of file usb_task.h.

Referenced by host_check_class(), and usb_set_interface().

#define ENDPOINT_TYPE   0x02

Definition at line 127 of file usb_task.h.

Referenced by usb_clear_feature(), and usb_set_feature().

#define FEATURE_DEVICE_REMOTE_WAKEUP   0x01

Definition at line 139 of file usb_task.h.

Referenced by usb_set_feature().

#define FEATURE_ENDPOINT_HALT   0x00

Definition at line 140 of file usb_task.h.

Referenced by usb_clear_feature(), and usb_set_feature().

#define FEATURE_TEST_MODE   0x02

Definition at line 141 of file usb_task.h.

Referenced by usb_set_feature().

#define GET_CONFIGURATION   0x08

Definition at line 113 of file usb_task.h.

Referenced by usb_process_request().

#define GET_CONFIGURATION_DESCRIPTOR   4

Definition at line 120 of file usb_task.h.

#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_addr U8: Endpoint address
Returns:
U8: Endpoint direction

Definition at line 166 of file usb_task.h.

#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_addr U8: Endpoint address
Returns:
U8: Endpoint number

Definition at line 161 of file usb_task.h.

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

#define GET_DESCRIPTOR   0x06

Definition at line 111 of file usb_task.h.

Referenced by usb_process_request(), and usb_user_read_request().

#define GET_DEVICE   0x01

Definition at line 106 of file usb_task.h.

#define GET_DEVICE_DESCRIPTOR   1

Definition at line 119 of file usb_task.h.

#define GET_INTERFACE   0x0A

Definition at line 115 of file usb_task.h.

Referenced by usb_process_request().

#define GET_STATUS   0x00

Definition at line 105 of file usb_task.h.

Referenced by usb_process_request().

#define GET_STRING   0x03

Definition at line 108 of file usb_task.h.

#define INTERFACE_DESCRIPTOR   0x04

Definition at line 133 of file usb_task.h.

Referenced by host_check_class(), and usb_set_interface().

#define INTERFACE_TYPE   0x01

Definition at line 126 of file usb_task.h.

Referenced by usb_clear_feature().

#define MSK_EP_DIR   0x80

Definition at line 156 of file usb_task.h.

Referenced by usb_set_interface().

#define MSK_EP_NBR   0x0F

Definition at line 155 of file usb_task.h.

#define OTHER_SPEED_CONFIGURATION_DESCRIPTOR   0x07

Definition at line 136 of file usb_task.h.

Referenced by usb_get_descriptor().

#define REQUEST_DEVICE_STATUS   0x80

Definition at line 122 of file usb_task.h.

Referenced by usb_get_status().

#define REQUEST_ENDPOINT_STATUS   0x82

Definition at line 124 of file usb_task.h.

Referenced by usb_get_status().

#define REQUEST_INTERFACE_STATUS   0x81

Definition at line 123 of file usb_task.h.

Referenced by usb_get_status().

#define SELF_POWERED   1

Definition at line 152 of file usb_task.h.

#define SET_ADDRESS   0x05

Definition at line 110 of file usb_task.h.

Referenced by usb_process_request().

#define SET_CONFIGURATION   0x09

Definition at line 114 of file usb_task.h.

Referenced by usb_process_request(), and usb_user_read_request().

#define SET_DESCRIPTOR   0x07

Definition at line 112 of file usb_task.h.

Referenced by usb_process_request().

#define SET_FEATURE   0x03

Definition at line 109 of file usb_task.h.

Referenced by usb_process_request().

#define SET_INTERFACE   0x0B

Definition at line 116 of file usb_task.h.

Referenced by usb_process_request().

#define STRING_DESCRIPTOR   0x03

Definition at line 132 of file usb_task.h.

Referenced by usb_user_get_descriptor().

#define SYNCH_FRAME   0x0C

Definition at line 117 of file usb_task.h.

Referenced by usb_process_request().

#define TEST_FORCE_ENABLE   0x05

Definition at line 148 of file usb_task.h.

Referenced by usb_set_feature().

#define TEST_J   0x01

Definition at line 144 of file usb_task.h.

Referenced by usb_set_feature().

#define TEST_K   0x02

Definition at line 145 of file usb_task.h.

Referenced by usb_set_feature().

#define TEST_PACKET   0x04

Definition at line 147 of file usb_task.h.

Referenced by usb_set_feature().

#define TEST_SE0_NAK   0x03

Definition at line 146 of file usb_task.h.

Referenced by usb_set_feature().

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

Definition at line 182 of file usb_task.h.

Referenced by host_transfer_control().

#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:
width Data width in bits: 16, 32 or 64
data 16-, 32- or 64-bit data to format
Returns:
Formatted 16-, 32- or 64-bit data

Definition at line 180 of file usb_task.h.

#define usb_format_usb_to_mcu_data ( width,
data   )     (TPASTE2(swap, width)(data))

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

Definition at line 181 of file usb_task.h.


Generated on Fri Feb 19 02:27:53 2010 for AVR32 - USB Enumeration Example by  doxygen 1.5.5