USB Device Core API#
USB Device Core API.
Modules#
Enumerations#
DATA TYPES.
BUS EVENT DATA TYPE.
CONFIG EVENT DATA TYPE.
Typedefs#
EP ASYNCHRONOUS CALLBACK API.
Functions#
FUNCTION PROTOTYPES.
Start the device stack.
Stop the device stack.
Get the current device state.
Get device speed.
Set the device's current power source.
Set the device's Microsoft vendor code.
Get the last frame number from the driver.
Add a configuration attribute to the device.
Associate a configuration with its alternative-speed counterpart.
Add an alternate setting to a specific interface.
Create an interface group.
Get the device descriptor.
Get a configuration descriptor.
Get a string descriptor.
Add string to USB device.
Get string index corresponding to a given string.
Write an 8-bit value to the descriptor buffer.
Write a 16-bit value in the descriptor buffer.
Write a 24-bit value to the descriptor buffer.
Write a 32-bit value to the descriptor buffer.
Write a buffer into the descriptor buffer.
Send data on the Control IN endpoint.
Receive data on the Control OUT endpoint.
Add a bulk endpoint to alternate setting interface.
Receive data on Bulk OUT endpoint.
Receive data on Bulk OUT endpoint asynchronously.
Send data on a Bulk IN endpoint.
Send data on the Bulk IN endpoint asynchronously.
Add an interrupt endpoint to an alternate setting interface.
Receive data on the Interrupt OUT endpoint.
Receive data on Interrupt OUT endpoint asynchronously.
Send data on Interrupt IN endpoint.
Send data on the Interrupt IN endpoint asynchronously.
Add an isochronous endpoint to alternate setting interface.
Receive zero-length packet from the host.
Abort I/O transfer on the endpoint.
Notify USB stack that packet receive has completed.
Notify USB stack that packet transmit has completed.
Notify USB stack that packet transmit has completed (see Note #1).
Stall the non-control endpoint.
Get the stall status of a non-control endpoint.
Retrieve the endpoint maximum packet size.
Get the maximum physical endpoint number.
Macros#
MODULE.
CONFIGURATION ATTRIBUTES.
DEVICE DESCRIPTOR LENGTH.
SUB-CLASS CODES.
PROTOCOL CODES.
FEATURE SELECTORS.
DEVICE POWER CONSTRAINS.
ENDPOINT TYPE.
ENDPOINT ADDRESS.
MICROSOFT OS DESCRIPTOR DEFINES.
USB EP INFORMATION TABLE DEFINES.
USB OBJECT NUMBER.
USB DEFAULT CONFIGS.
USB CORE EVENTS.
GLOBAL CONSTANTS.
ENDPOINT CONVERSION MACROS.
Enumeration Documentation#
sl_usbd_device_speed_t#
sl_usbd_device_speed_t
DATA TYPES.
USB DEVICE SPEED DATA TYPE
Note
(1) 'Universal Serial Bus Specification Rev 2.0', section 4.2.1 defines three data rates:
(a) The USB Low-Speed (LS) signaling bit rate is 1.5 Mb/s.
(b) The USB Full-Speed (FS) signaling bit rate is 12 Mb/s.
(c) The USB High-Speed (HS) signaling bit rate is 480 Mb/s.
Enumerator | |
---|---|
SL_USBD_DEVICE_SPEED_INVALID | |
SL_USBD_DEVICE_SPEED_LOW | Low-Speed (see Note #1a). |
SL_USBD_DEVICE_SPEED_FULL | Full-Speed (see Note #1b). |
SL_USBD_DEVICE_SPEED_HIGH | High-Speed (see Note #1c). |
414
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_device_state_t#
sl_usbd_device_state_t
USB DEVICE STATES DATA TYPE
Note
(1) 'Universal Serial Bus Specification Rev 2.0', section 9.1.1 defines seven visible device states:
(a) SL_USBD_DEVICE_STATE_INIT : Device is not attached to the USB.
(b) SL_USBD_DEVICE_STATE_ATTACHED : Device is attached to the USB, but not powered.
(c) USBD_DEV_STATE_POWERED : Device is attached to the USB and powered, but has not been reset.
(d) SL_USBD_DEVICE_STATE_DEFAULT : Device is attached to the USB and powered and has been reset, but has not been assigned a unique address. Device responds at the default address.
(e) SL_USBD_DEVICE_STATE_ADDRESSED : Device is attached to the USB, powered, has been reset, and a unique device address has been assigned. Device is not configured.
(f) SL_USBD_DEVICE_STATE_CONFIGURED : Device is attached to the USB, powered, has been reset, has a unique address, is configured, and is not suspended. The host may now use the function provided by the device.
(g) SL_USBD_DEVICE_STATE_SUSPENDED : Device is, at minimum, attached to the USB and is powered and has not seen bus activity for 3 ms. It may also have a unique address and be configured for use. However, because the device is suspended, the host may not use the device's function.
(2) An additional state is added (USBD_DEV_STATE_START) to determine if the device controller has been initialized.
Enumerator | |
---|---|
SL_USBD_DEVICE_STATE_NONE | |
SL_USBD_DEVICE_STATE_INIT | |
SL_USBD_DEVICE_STATE_ATTACHED | |
SL_USBD_DEVICE_STATE_DEFAULT | |
SL_USBD_DEVICE_STATE_ADDRESSED | |
SL_USBD_DEVICE_STATE_CONFIGURED | |
SL_USBD_DEVICE_STATE_SUSPENDED |
448
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_bus_event_t#
sl_usbd_bus_event_t
BUS EVENT DATA TYPE.
Enumerator | |
---|---|
SL_USBD_EVENT_BUS_CONNECT | |
SL_USBD_EVENT_BUS_DISCONNECT | |
SL_USBD_EVENT_BUS_RESET | |
SL_USBD_EVENT_BUS_SUSPEND | |
SL_USBD_EVENT_BUS_RESUME |
462
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_config_event_t#
sl_usbd_config_event_t
CONFIG EVENT DATA TYPE.
Enumerator | |
---|---|
SL_USBD_EVENT_CONFIG_SET | |
SL_USBD_EVENT_CONFIG_UNSET |
474
of file protocol/usb/inc/sl_usbd_core.h
Typedef Documentation#
sl_usbd_async_function_t#
typedef void(* sl_usbd_async_function_t) (uint8_t ep_addr, void *p_buf, uint32_t buf_len, uint32_t xfer_len, void *p_arg, sl_status_t status) )(uint8_t ep_addr, void *p_buf, uint32_t buf_len, uint32_t xfer_len, void *p_arg, sl_status_t status)
EP ASYNCHRONOUS CALLBACK API.
588
of file protocol/usb/inc/sl_usbd_core.h
Function Documentation#
sl_usbd_core_init#
sl_status_t sl_usbd_core_init (void )
FUNCTION PROTOTYPES.
N/A |
CONFIGURATION OVERRIDE FUNCTIONS USBD CORE FUNCTIONS
Note(s) : (1) USB Spec 2.0, Section 5.5 states "Control transfers allow access to different parts of a device. Control transfers are intended to support configuration/command/status type communication flows between client software and its function".
(a) "Each USB device is required to implement the Default Control Pipe as a message pipe. This pipe is used by the USB System Software. The Default Control Pipe provides access to the USB device's configuration, status, and control information".
The 'sl_usbd_core_ep_XXXX()' functions perform operations in the default endpoint. Class drivers should use 'sl_usbd_core_ep_XXXX()' to send/receive class specific requests.
sl_usbd_core_init()
Initialize the USB device stack.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) sli_usbd_core_init_internals() MUST be called ... :
(a) ONLY ONCE from a product's application;
(b) With the following conditions:
(1) AFTER the product's OS has been initialized.
(2) BEFORE the product's application calls any USB device stack function(s).
685
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_start_device#
sl_status_t sl_usbd_core_start_device (void )
Start the device stack.
N/A |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Device stack can be only started if the device is in one of the following states:
SL_USBD_DEVICE_STATE_NONE Device controller has not been initialized.
SL_USBD_DEVICE_STATE_INIT Device controller is already initialized.
696
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_stop_device#
sl_status_t sl_usbd_core_stop_device (void )
Stop the device stack.
N/A |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
703
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_device_state#
sl_status_t sl_usbd_core_get_device_state (sl_usbd_device_state_t * p_dev_state)
Get the current device state.
N/A | p_dev_state | Pointer to device state to be returned. Set to current device state, if no errors are returned, or SL_USBD_DEVICE_STATE_NONE, if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
714
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_device_speed#
sl_status_t sl_usbd_core_get_device_speed (sl_usbd_device_speed_t * p_dev_speed)
Get device speed.
N/A | p_dev_speed | Pointer to the variable that will be set to device speed upon return. It will be set to current device speed, if successful, or SL_USBD_DEVICE_SPEED_INVALID, if unsuccessful. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
725
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_set_device_self_power#
sl_status_t sl_usbd_core_set_device_self_power (bool self_pwr)
Set the device's current power source.
N/A | self_pwr | The power source of the device :
|
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
736
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_device_configuration#
sl_status_t sl_usbd_core_get_device_configuration (sl_usbd_device_config_t ** p_dev_cfg)
Set the device's Microsoft vendor code.
N/A | p_dev_cfg | Pointer to a variable of type (sl_usbd_device_config_t *) which will receive the memory address of device configuration structure upon return. The variable will be set to point to device configuration, if no errors are returned, or it will be set to NULL if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) The vendor code used MUST be different from any vendor bRequest value.
Get the device configuration.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
761
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_device_frame_number#
sl_status_t sl_usbd_core_get_device_frame_number (uint16_t * p_frame_nbr)
Get the last frame number from the driver.
N/A | p_frame_nbr | Pointer to variable that will receive frame number. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) The frame number will always be in the range of 0-2047 (11 bits).
(2) Frame number returned to the caller contains the frame and microframe numbers. It is encoded following this 16-bit format:
* | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | * | 0 0 | microframe | frame | *
Caller must use the macros SL_USBD_FRAME_NBR_GET() or SL_USBD_MICROFRAME_NBR_GET() to get the frame or microframe number only.
781
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_configuration#
sl_status_t sl_usbd_core_add_configuration (uint8_t attrib, uint16_t max_pwr, sl_usbd_device_speed_t spd, const char * p_name, uint8_t * p_cfg_nbr)
Add a configuration attribute to the device.
N/A | attrib | Available configuration attributes.
|
N/A | max_pwr | Bus power required for this device (see Note #1). |
N/A | spd | Available configuration speeds.
|
N/A | p_name | Pointer to string describing the configuration (see Note #2). |
N/A | p_cfg_nbr | Pointer to variable that will receive the configuration number. It will be set to the configuration number, if no errors are returned, otherwise it will be set to SL_USBD_CONFIG_NBR_NONE if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB spec 2.0 (section 7.2.1.3/4) defines power constraints for bus-powered devices: "A low-power function draws up to one unit load from the USB cable when operational" "A function is high-power if, when fully powered, draws over one, but no more than five, unit loads from the USB cable." A unit load is defined as 100mA, so 'max_pwr' argument should be between 0 mA and 500mA
(2) String support is optional: 'p_name' can be a NULL string pointer.
(3) Configuration can only be added when the device is in the following states:
SL_USBD_DEVICE_STATE_NONE Device controller has not been initialized.
SL_USBD_DEVICE_STATE_INIT Device controller is already initialized.
816
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_interface#
sl_status_t sl_usbd_core_add_interface (uint8_t cfg_nbr, sl_usbd_class_driver_t * p_class_drv, void * p_if_class_arg, void * p_if_alt_class_arg, uint8_t class_code, uint8_t class_sub_code, uint8_t class_protocol_code, const char * p_name, uint8_t * p_if_nbr)
Associate a configuration with its alternative-speed counterpart.
N/A | cfg_nbr | Configuration index to add the interface. |
N/A | p_class_drv | Pointer to interface driver. |
N/A | p_if_class_arg | Pointer to interface driver argument. |
N/A | p_if_alt_class_arg | Pointer to alternate interface argument. |
N/A | class_code | Class code assigned by the USB-IF. |
N/A | class_sub_code | Subclass code assigned by the USB-IF. |
N/A | class_protocol_code | protocol code assigned by the USB-IF. |
N/A | p_name | Pointer to string describing the Interface. |
N/A | p_if_nbr | Pointer to a variable that will receive interface number after creation. The variable will be set to the interface number, if no errors are returned, otherwise it is set to SL_USBD_INTERFACE_NBR_NONE. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Configurations from high- and full-speed can be associated with each other to provide comparable functionality regardless of speed.
(2) Configuration can ONLY be associated when the device is in the following states:
SL_USBD_DEVICE_STATE_NONE Device controller has not been initialized.
SL_USBD_DEVICE_STATE_INIT Device controller is already initialized.
Add an interface to a specific configuration.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB Spec 2.0 Interface (section 9.6.5) states: "An interface may include alternate settings that allow the endpoints and/or their characteristics to be varied after the device has been configured. The default setting for an interface is always an alternate setting of zero."
873
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_alt_interface#
sl_status_t sl_usbd_core_add_alt_interface (uint8_t config_nbr, uint8_t if_nbr, void * p_class_arg, const char * p_name, uint8_t * p_if_alt_nbr)
Add an alternate setting to a specific interface.
N/A | config_nbr | Configuration number. |
N/A | if_nbr | Interface number. |
N/A | p_class_arg | Pointer to alternate interface argument. |
N/A | p_name | Pointer to alternate setting name. |
N/A | p_if_alt_nbr | Pointer to variable that will receive alternate setting number upon return. It will be set to interface alternate setting number if no error(s) are returned, or SL_USBD_ALT_INTERFACE_NBR_NONE if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
900
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_interface_group#
sl_status_t sl_usbd_core_add_interface_group (uint8_t config_nbr, uint8_t class_code, uint8_t class_sub_code, uint8_t class_protocol_code, uint8_t if_start, uint8_t if_cnt, const char * p_name, uint8_t * p_if_grp_num)
Create an interface group.
N/A | config_nbr | Configuration number. |
N/A | class_code | Class code assigned by the USB-IF. |
N/A | class_sub_code | Subclass code assigned by the USB-IF. |
N/A | class_protocol_code | protocol code assigned by the USB-IF. |
N/A | if_start | Interface number of the first interface that is associated with this group. |
N/A | if_cnt | Number of consecutive interfaces that are associated with this group. |
N/A | p_name | Pointer to the string that describes the interface group. |
N/A | p_if_grp_num | Pointer to the variable that will receive interface group number upon return. The variable is set to interface group number if no errors are returned, or SL_USBD_INTERFACE_GROUP_NBR_NONE if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
929
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_device_descriptor#
sl_status_t sl_usbd_core_get_device_descriptor (uint8_t * p_buf, uint8_t max_len, uint8_t * p_desc_len)
Get the device descriptor.
N/A | p_buf | Pointer to the destination buffer. |
N/A | max_len | Maximum number of bytes to write in destination buffer. |
N/A | p_desc_len | Pointer to a variable that will receive the actual size of the descriptor. The variable is set to number of bytes actually in the descriptor if no errors are returned, or set to 0 if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function should be used by drivers that supporting the standard requests auto-reply, (during the initialization process).
954
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_configuration_descriptor#
sl_status_t sl_usbd_core_get_configuration_descriptor (uint8_t * p_buf, uint16_t max_len, uint8_t config_ix, uint16_t * p_desc_len)
Get a configuration descriptor.
N/A | p_buf | Pointer to the destination buffer. |
N/A | max_len | Maximum number of bytes to write in the destination buffer. |
N/A | config_ix | Index of the desired configuration descriptor. |
N/A | p_desc_len | Pointer to a variable that will receive the actual size of the descriptor. The variable is set to number of bytes actually in the descriptor if no errors are returned, or set to 0 if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function should be used by drivers supporting a standard request's auto-reply, during the initialization process.
976
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_string_descriptor#
sl_status_t sl_usbd_core_get_string_descriptor (uint8_t * p_buf, uint8_t max_len, uint8_t str_ix, uint8_t * p_desc_len)
Get a string descriptor.
N/A | p_buf | Pointer to the destination buffer. |
N/A | max_len | Maximum number of bytes to write in destination buffer. |
N/A | str_ix | Index of the desired string descriptor. |
N/A | p_desc_len | Pointer to a variable that will receive the actual size of the descriptor. The variable is set to number of bytes actually in the descriptor if no errors are returned, or set to 0 if any errors are returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function should be used by drivers supporting a standard request's auto-reply, during the initialization process.
1000
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_string#
sl_status_t sl_usbd_core_add_string (const char * p_str)
Add string to USB device.
N/A | p_str | Pointer to string to add (see Note #1). |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB spec 2.0 chapter 9.5 states: "Where appropriate, descriptors contain references to string descriptors that provide displayable information describing a descriptor in human-readable form. The inclusion of string descriptors is optional. However, the reference fields within descriptors are mandatory. If a device does not support string descriptors, string reference fields must be reset to zero to indicate no string descriptor is available". Since string descriptors are optional, 'p_str' could be a NULL pointer.
1022
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_string_index#
sl_status_t sl_usbd_core_get_string_index (const char * p_str, uint8_t * p_str_ix)
Get string index corresponding to a given string.
N/A | p_str | Pointer to string. |
N/A | p_str_ix | Pointer to variable where string index will be returned. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1035
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_08b_to_descriptor_buf#
sl_status_t sl_usbd_core_write_08b_to_descriptor_buf (uint8_t val)
Write an 8-bit value to the descriptor buffer.
N/A | val | 8-bit value to write in the descriptor buffer. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB classes may use this function to append class-specific descriptors to the configuration descriptor.
1049
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_16b_to_descriptor_buf#
sl_status_t sl_usbd_core_write_16b_to_descriptor_buf (uint16_t val)
Write a 16-bit value in the descriptor buffer.
N/A | val | 16-bit value. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB classes may use this function to append class-specific descriptors to the configuration descriptor.
(2) USB descriptors are in little-endian format.
1063
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_24b_to_descriptor_buf#
sl_status_t sl_usbd_core_write_24b_to_descriptor_buf (uint32_t val)
Write a 24-bit value to the descriptor buffer.
N/A | val | 32-bit value containing 24 useful bits to write in the descriptor buffer. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB classes may use this function to append class-specific descriptors to the configuration descriptor.
(2) USB descriptors are in little-endian format.
1077
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_32b_to_descriptor_buf#
sl_status_t sl_usbd_core_write_32b_to_descriptor_buf (uint32_t val)
Write a 32-bit value to the descriptor buffer.
N/A | val | 32-bit value to write in the descriptor buffer. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB classes may use this function to append class-specific descriptors to the configuration descriptor.
(2) USB descriptors are in little-endian format.
1091
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_buf_to_descriptor_buf#
sl_status_t sl_usbd_core_write_buf_to_descriptor_buf (const uint8_t * p_buf, uint16_t len)
Write a buffer into the descriptor buffer.
N/A | p_buf | Pointer to the buffer to write into the descriptor buffer. |
N/A | len | Length of the buffer. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) USB classes may use this function to append class-specific descriptors to the configuration descriptor.
1105
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_control_sync#
sl_status_t sl_usbd_core_write_control_sync (void * p_buf, uint32_t buf_len, uint16_t timeout_ms, bool end, uint32_t * p_xfer_len)
Send data on the Control IN endpoint.
N/A | p_buf | Pointer to the buffer of data that will be sent (see Note #2). |
N/A | buf_len | Number of octets to transmit. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | end | End-of-transfer flag (see Note #1). |
N/A | p_xfer_len | Pointer to a variable that will be set to the number of octets transmitted. The variable is set to the number of octets transmitted if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) If end-of-transfer is set and transfer length is multiple of maximum packet size, a zero-length packet is transferred to indicate a short transfer to the host.
(2) Transmit buffer must be 32 bits aligned.
1130
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_read_control_sync#
sl_status_t sl_usbd_core_read_control_sync (void * p_buf, uint32_t buf_len, uint16_t timeout_ms, uint32_t * p_xfer_len)
Receive data on the Control OUT endpoint.
N/A | p_buf | Pointer to the destination buffer to receive data (see Note #1). |
N/A | buf_len | Number of octets to receive. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | p_xfer_len | Pointer to a variable that will be set to the number of octets received. The variable is set to the number of octets received if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Receive buffer must be 32 bits aligned.
1153
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_bulk_endpoint#
sl_status_t sl_usbd_core_add_bulk_endpoint (uint8_t config_nbr, uint8_t if_nbr, uint8_t if_alt_nbr, bool dir_in, uint16_t max_pkt_len, uint8_t * p_ep_addr)
Add a bulk endpoint to alternate setting interface.
N/A | config_nbr | Configuration number. |
N/A | if_nbr | Interface number. |
N/A | if_alt_nbr | Interface alternate setting number. |
N/A | dir_in | Endpoint direction.
|
N/A | max_pkt_len | Endpoint maximum packet length (see Note #1) |
N/A | p_ep_addr | Pointer to a variable that will receive the new endpoint address. The variable will be set to endpoint address if no errors are returned, otherwise it will be set to SL_USBD_ENDPOINT_ADDR_NONE. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) If the 'max_pkt_len' argument is '0', the stack will allocate the first available BULK endpoint, regardless its maximum packet size.
1182
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_read_bulk_sync#
sl_status_t sl_usbd_core_read_bulk_sync (uint8_t ep_addr, void * p_buf, uint32_t buf_len, uint16_t timeout_ms, uint32_t * p_xfer_len)
Receive data on Bulk OUT endpoint.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the destination buffer to receive data (see Note #1). |
N/A | buf_len | Number of octets to receive. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | p_xfer_len | Pointer to a variable that will be set to the number of octets received. The variable is set to the number of octets received if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Receive buffer must be 32 bits aligned.
1208
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_read_bulk_async#
sl_status_t sl_usbd_core_read_bulk_async (uint8_t ep_addr, void * p_buf, uint32_t buf_len, sl_usbd_async_function_t async_fnct, void * p_async_arg)
Receive data on Bulk OUT endpoint asynchronously.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the destination buffer to receive data (see Note #1). |
N/A | buf_len | Number of octets to receive. |
N/A | async_fnct | Function that will be invoked upon completion of receive operation. |
N/A | p_async_arg | Pointer to the argument that will be passed as parameter of 'async_fnct'. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Receive buffer must be 32 bits aligned.
1231
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_bulk_sync#
sl_status_t sl_usbd_core_write_bulk_sync (uint8_t ep_addr, void * p_buf, uint32_t buf_len, uint16_t timeout_ms, bool end, uint32_t * p_xfer_len)
Send data on a Bulk IN endpoint.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to buffer of data that will be transmitted (see Note #2). |
N/A | buf_len | Number of octets to transmit. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | end | End-of-transfer flag (see Note #3). |
N/A | p_xfer_len | Pointer to a variable that will receive the number of octets transmitted. The variable is set to the number of octets transmitted if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function SHOULD NOT be called from interrupt service routine (ISR).
(2) Transmit buffer must be 32 bits aligned.
(3) If end-of-transfer is set and transfer length is multiple of maximum packet sizes, a zero-length packet is transferred to indicate a short transfer to the host.
1263
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_bulk_async#
sl_status_t sl_usbd_core_write_bulk_async (uint8_t ep_addr, void * p_buf, uint32_t buf_len, sl_usbd_async_function_t async_fnct, void * p_async_arg, bool end)
Send data on the Bulk IN endpoint asynchronously.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the buffer of data that will be transmitted (see Note #1). |
N/A | buf_len | Number of octets to transmit. |
N/A | async_fnct | Function that will be invoked upon completion of transmit operation. |
N/A | p_async_arg | Pointer to the argument that will be passed as parameter of 'async_fnct'. |
N/A | end | End-of-transfer flag (see Note #2). |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Transmit buffer must be 32 bits aligned.
(2) If end-of-transfer is set and transfer length is multiple of maximum packet size, a zero-length packet is transferred to indicate a short transfer to the host.
1292
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_add_interrupt_endpoint#
sl_status_t sl_usbd_core_add_interrupt_endpoint (uint8_t config_nbr, uint8_t if_nbr, uint8_t if_alt_nbr, bool dir_in, uint16_t max_pkt_len, uint16_t interval, uint8_t * p_ep_addr)
Add an interrupt endpoint to an alternate setting interface.
N/A | config_nbr | Configuration number. |
N/A | if_nbr | Interface number. |
N/A | if_alt_nbr | Interface alternate setting number. |
N/A | dir_in | Endpoint Direction.
|
N/A | max_pkt_len | Endpoint maximum packet length. (see Note #1) |
N/A | interval | Endpoint interval in frames or microframes. |
N/A | p_ep_addr | Pointer to a variable that will receive the new endpoint address. The variable will be set to endpoint address if no errors are returned, otherwise it will be set to SL_USBD_ENDPOINT_ADDR_NONE. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) If the 'max_pkt_len' argument is '0', the stack will allocate the first available INTERRUPT endpoint, regardless its maximum packet size.
1325
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_read_interrupt_sync#
sl_status_t sl_usbd_core_read_interrupt_sync (uint8_t ep_addr, void * p_buf, uint32_t buf_len, uint16_t timeout_ms, uint32_t * p_xfer_len)
Receive data on the Interrupt OUT endpoint.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the destination buffer to receive data (see Note #2). |
N/A | buf_len | Number of octets to receive. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | p_xfer_len | Pointer to a variable that will be set to the number of octets received. The variable is set to the number of octets received if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function SHOULD NOT be called from interrupt service routine (ISR).
(2) Receive buffer must be 32 bits aligned.
1354
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_read_interrupt_async#
sl_status_t sl_usbd_core_read_interrupt_async (uint8_t ep_addr, void * p_buf, uint32_t buf_len, sl_usbd_async_function_t async_fnct, void * p_async_arg)
Receive data on Interrupt OUT endpoint asynchronously.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the destination buffer to receive data (see Note #1). |
N/A | buf_len | Number of octets to receive. |
N/A | async_fnct | Function that will be invoked upon completion of receive operation. |
N/A | p_async_arg | Pointer to argument that will be passed as parameter of 'async_fnct'. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Receive buffer must be 32 bits aligned.
1377
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_interrupt_sync#
sl_status_t sl_usbd_core_write_interrupt_sync (uint8_t ep_addr, void * p_buf, uint32_t buf_len, uint16_t timeout_ms, bool end, uint32_t * p_xfer_len)
Send data on Interrupt IN endpoint.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the buffer of data that will be transmitted (see Note #2). |
N/A | buf_len | Number of octets to transmit. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | end | End-of-transfer flag (see Note #3). |
N/A | p_xfer_len | Pointer to a variable that will be set to the number of octets transmitted. The variable is set to the number of octets transmitted if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function SHOULD NOT be called from interrupt service routine (ISR).
(2) Transmit buffer must be 32 bits aligned.
(3) If end-of-transfer is set and transfer length is multiple of maximum packet size, a zero-length packet is transferred to indicate a short transfer to the host.
1409
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_write_interrupt_async#
sl_status_t sl_usbd_core_write_interrupt_async (uint8_t ep_addr, void * p_buf, uint32_t buf_len, sl_usbd_async_function_t async_fnct, void * p_async_arg, bool end)
Send data on the Interrupt IN endpoint asynchronously.
N/A | ep_addr | Endpoint address. |
N/A | p_buf | Pointer to the buffer of data that will be transmitted (see Note #1). |
N/A | buf_len | Number of octets to transmit. |
N/A | async_fnct | Function that will be invoked upon completion of transmit operation. |
N/A | p_async_arg | Pointer to the argument that will be passed as parameter of 'async_fnct'. |
N/A | end | End-of-transfer flag (see Note #2). |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Transmit buffer must be 32 bits aligned.
(2) If end-of-transfer is set and transfer length is multiple of maximum packet size, a zero-length packet is transferred to indicate a short transfer to the host.
1438
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_endpoint_write_zlp#
sl_status_t sl_usbd_core_endpoint_write_zlp (uint8_t ep_addr, uint16_t timeout_ms, if_alt_nbr, dir_in, attrib, max_pkt_len, transaction_frame, interval, p_ep_addr)
Add an isochronous endpoint to alternate setting interface.
N/A | ep_addr | Endpoint address. |
N/A | timeout_ms | Timeout in milliseconds. |
N/A | if_alt_nbr | Interface alternate setting number. |
N/A | dir_in | Data endpoint address. |
N/A | attrib | Associated synchronization endpoint. |
N/A | max_pkt_len | Endpoint maximum packet length (see Note #1). |
N/A | transaction_frame | Endpoint transactions per (micro)frame (see Note #2). |
N/A | interval | Endpoint interval in frames or microframes. |
N/A | p_ep_addr | Pointer to a variable that will receive the new endpoint address. The variable will be set to endpoint address if no errors are returned, otherwise it will be set to SL_USBD_ENDPOINT_ADDR_NONE. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) If the 'max_pkt_len' argument is '0', the stack allocates the first available ISOCHRONOUS endpoint regardless of its maximum packet size.
(2) For full-speed endpoints, 'transaction_frame' must be set to 1 since there is no support for high-bandwidth endpoints.
(3) For full-/high-speed isochronous endpoints, bInterval value must be in the range from 1 to 16. The bInterval value is used as the exponent for a 2^(bInterval-1) value. Maximum polling interval value is 2^(16-1) = 32768 frames in full-speed and 32768 microframes (i.e., 4096 frames) in high-speed.
Receive data on an isochronous OUT endpoint asynchronously.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Receive buffer must be 32 bits aligned.
Send data on an isochronous IN endpoint asynchronously.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Transmit buffer must be 32 bits aligned.
Set synchronization feedback rate on synchronization isochronous endpoint.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Synchronization endpoints can ONLY be associated when the device is in the following states:
SL_USBD_DEVICE_STATE_NONE Device controller has not been initialized.
SL_USBD_DEVICE_STATE_INIT Device controller is already initialized.
(2) For audio class 1.0, the interface class code must be SL_USBD_CLASS_CODE_AUDIO and protocol 'zero'
(3) If explicit synchronization mechanism is needed to maintain synchronization during transfers, the information carried over the synchronization path must be available every 2 ^ (10 - P) frames, with P ranging from 1 to 9 (512 ms down to 2 ms).
(4) Table 4-22 "Standard AS Isochronous Synch Endpoint Descriptor" of Audio 1.0 specification indicates for bmAttributes field no usage type for bits 5..4. But USB 2.0 specification, Table 9-13 "Standard Endpoint Descriptor" indicates several types of usage. When an explicit feedback is defined for a asynchronous isochronous endpoint, the associated synch feedback should use the Usage type 'Feedback endpoint'.
Associate synchronization endpoint to isochronous endpoint.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) Synchronization endpoints can ONLY be associated when the device is in the following states:
SL_USBD_DEVICE_STATE_NONE Device controller has not been initialized.
SL_USBD_DEVICE_STATE_INIT Device controller is already initialized.
(2) For audio class 1.0, interface class code must be SL_USBD_CLASS_CODE_AUDIO and protocol 'zero'.
Send zero-length packet to the host.
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function should only be called during a synchronous transfer.
1630
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_endpoint_read_zlp#
sl_status_t sl_usbd_core_endpoint_read_zlp (uint8_t ep_addr, uint16_t timeout_ms)
Receive zero-length packet from the host.
N/A | ep_addr | Endpoint address. |
N/A | timeout_ms | Timeout in milliseconds. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function should only be called during a synchronous transfer.
1644
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_abort_endpoint#
sl_status_t sl_usbd_core_abort_endpoint (uint8_t ep_addr)
Abort I/O transfer on the endpoint.
N/A | ep_addr | Endpoint address. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1654
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_endpoint_read_complete#
sl_status_t sl_usbd_core_endpoint_read_complete (uint8_t ep_log_nbr)
Notify USB stack that packet receive has completed.
N/A | ep_log_nbr | Endpoint logical number. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1663
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_endpoint_write_complete#
sl_status_t sl_usbd_core_endpoint_write_complete (uint8_t ep_log_nbr)
Notify USB stack that packet transmit has completed.
N/A | ep_log_nbr | Endpoint logical number. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1672
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_endpoint_write_complete_extended#
sl_status_t sl_usbd_core_endpoint_write_complete_extended (uint8_t ep_log_nbr, sl_status_t xfer_err)
Notify USB stack that packet transmit has completed (see Note #1).
N/A | ep_log_nbr | Endpoint logical number. |
N/A | xfer_err | Error code returned by the USB driver. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
Note
(1) This function is an alternative to the function sl_usbd_core_endpoint_write_complete() so that a USB device driver can return to the core an error code upon the Tx transfer completion.
1686
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_stall_endpoint#
sl_status_t sl_usbd_core_stall_endpoint (uint8_t ep_addr, bool state)
Stall the non-control endpoint.
N/A | ep_addr | Endpoint address. |
N/A | state | Endpoint stall state. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1698
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_is_endpoint_stalled#
sl_status_t sl_usbd_core_is_endpoint_stalled (uint8_t ep_addr, bool * p_ep_stall)
Get the stall status of a non-control endpoint.
N/A | ep_addr | Endpoint address. |
N/A | p_ep_stall | Pointer to a boolean that will receive the endpoint stalled status. The boolean variable is set to true if endpoint is stalled, or is set to false if endpoint is not stalled. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1712
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_max_endpoint_packet_size#
sl_status_t sl_usbd_core_get_max_endpoint_packet_size (uint8_t ep_addr, uint16_t * p_max_size)
Retrieve the endpoint maximum packet size.
N/A | ep_addr | Endpoint address. |
N/A | p_max_size | Pointer to a variable that will receive the maximum packet size upon return. The variable is set to the maximum packet size if no errors are returned, otherwise it is set to 0. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1726
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_max_phy_endpoint_number#
sl_status_t sl_usbd_core_get_max_phy_endpoint_number (uint8_t * p_ep_phy_nbr)
Get the maximum physical endpoint number.
N/A | p_ep_phy_nbr | Pointer to variable where maximum physical endpoint number will be returned. If no errors are returned, the variable will be set to maximum physical endpoint number, otherwise it will be set to SL_USBD_ENDPOINT_PHY_NONE. |
Returns
Returns SL_STATUS_OK on success or another SL_STATUS code on failure.
1738
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_core_get_max_open_endpoint_number#
sl_status_t sl_usbd_core_get_max_open_endpoint_number (uint8_t * p_nbr_open)
N/A | p_nbr_open |
1740
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_on_bus_event#
__WEAK void sl_usbd_on_bus_event (sl_usbd_bus_event_t event)
N/A | event |
1743
of file protocol/usb/inc/sl_usbd_core.h
sl_usbd_on_config_event#
__WEAK void sl_usbd_on_config_event (sl_usbd_config_event_t event, uint8_t config_nbr)
N/A | event | |
N/A | config_nbr |
1745
of file protocol/usb/inc/sl_usbd_core.h
Macro Definition Documentation#
SL_USBD_FRAME_NBR_MAX#
#define SL_USBD_FRAME_NBR_MAXValue:
2047u
MODULE.
INCLUDE FILES MACROS
FRAME
Note(s) : (1) Section 8.3.3 of USB spec 2.0 describes the frame number as: "The frame number field is an 11-bit field that is incremented by the host on a per-frame basis. The frame number field rolls over upon reaching its maximum value of 7FFH and is sent only in SOF tokens at the start of each (micro)frame."
72
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FRAME_NBR_MASK#
#define SL_USBD_FRAME_NBR_MASKValue:
0b0000011111111111
73
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROFRAME_NBR_MASK#
#define SL_USBD_MICROFRAME_NBR_MASKValue:
0b0011100000000000
74
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DEV_ATTRIB_SELF_POWERED#
#define SL_USBD_DEV_ATTRIB_SELF_POWEREDValue:
0x01u
CONFIGURATION ATTRIBUTES.
80
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DEV_ATTRIB_REMOTE_WAKEUP#
#define SL_USBD_DEV_ATTRIB_REMOTE_WAKEUPValue:
0x02u
81
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_DEV#
#define SL_USBD_DESC_LEN_DEVValue:
18u
DEVICE DESCRIPTOR LENGTH.
87
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_DEV_QUAL#
#define SL_USBD_DESC_LEN_DEV_QUALValue:
10u
88
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_HDR#
#define SL_USBD_DESC_LEN_HDRValue:
2u
89
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_CFG#
#define SL_USBD_DESC_LEN_CFGValue:
9u
90
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_OTHER_SPD_CFG#
#define SL_USBD_DESC_LEN_OTHER_SPD_CFGValue:
9u
91
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_IF#
#define SL_USBD_DESC_LEN_IFValue:
9u
92
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_IF_ASSOCIATION#
#define SL_USBD_DESC_LEN_IF_ASSOCIATIONValue:
8u
93
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_EP#
#define SL_USBD_DESC_LEN_EPValue:
7u
94
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_LEN_OTG#
#define SL_USBD_DESC_LEN_OTGValue:
3u
95
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_DIR_MASK#
#define SL_USBD_REQ_DIR_MASKValue:
0x80u
REQUEST CHARACTERISTICS
Note(s) : (1) Request types are defined in USB spec 2.0, section 9.3, Table 9-2, 'RequestType' field.
103
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_DIR_HOST_TO_DEVICE#
#define SL_USBD_REQ_DIR_HOST_TO_DEVICEValue:
0x00u
104
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_DIR_DEVICE_TO_HOST#
#define SL_USBD_REQ_DIR_DEVICE_TO_HOSTValue:
0x80u
105
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_DIR_BIT#
#define SL_USBD_REQ_DIR_BITValue:
0x80u
106
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_TYPE_MASK#
#define SL_USBD_REQ_TYPE_MASKValue:
0x60u
108
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_TYPE_STANDARD#
#define SL_USBD_REQ_TYPE_STANDARDValue:
0x00u
109
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_TYPE_CLASS#
#define SL_USBD_REQ_TYPE_CLASSValue:
0x20u
110
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_TYPE_VENDOR#
#define SL_USBD_REQ_TYPE_VENDORValue:
0x40u
111
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_TYPE_RESERVED#
#define SL_USBD_REQ_TYPE_RESERVEDValue:
0x60u
112
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_RECIPIENT_MASK#
#define SL_USBD_REQ_RECIPIENT_MASKValue:
0x1Fu
114
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_RECIPIENT_DEVICE#
#define SL_USBD_REQ_RECIPIENT_DEVICEValue:
0x00u
115
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_RECIPIENT_INTERFACE#
#define SL_USBD_REQ_RECIPIENT_INTERFACEValue:
0x01u
116
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_RECIPIENT_ENDPOINT#
#define SL_USBD_REQ_RECIPIENT_ENDPOINTValue:
0x02u
117
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_RECIPIENT_OTHER#
#define SL_USBD_REQ_RECIPIENT_OTHERValue:
0x03u
118
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_GET_STATUS#
#define SL_USBD_REQ_GET_STATUSValue:
0u
STANDARD REQUESTS
Note(s) : (1) Request types are defined in USB spec 2.0, section 9.4, Table 9-4, 'RequestType' field.
126
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_CLEAR_FEATURE#
#define SL_USBD_REQ_CLEAR_FEATUREValue:
1u
127
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SET_FEATURE#
#define SL_USBD_REQ_SET_FEATUREValue:
3u
128
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SET_ADDRESS#
#define SL_USBD_REQ_SET_ADDRESSValue:
5u
129
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_GET_DESCRIPTOR#
#define SL_USBD_REQ_GET_DESCRIPTORValue:
6u
130
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SET_DESCRIPTOR#
#define SL_USBD_REQ_SET_DESCRIPTORValue:
7u
131
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_GET_CONFIGURATION#
#define SL_USBD_REQ_GET_CONFIGURATIONValue:
8u
132
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SET_CONFIGURATION#
#define SL_USBD_REQ_SET_CONFIGURATIONValue:
9u
133
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_GET_INTERFACE#
#define SL_USBD_REQ_GET_INTERFACEValue:
10u
134
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SET_INTERFACE#
#define SL_USBD_REQ_SET_INTERFACEValue:
11u
135
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_REQ_SYNCH_FRAME#
#define SL_USBD_REQ_SYNCH_FRAMEValue:
12u
136
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_DEVICE#
#define SL_USBD_DESC_TYPE_DEVICEValue:
1u
DESCRIPTOR TYPES
Note(s) : (1) Descriptors types are defined in the USB spec 2.0 section 9.2.6, Table 9-5.
144
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_CONFIGURATION#
#define SL_USBD_DESC_TYPE_CONFIGURATIONValue:
2u
145
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_STRING#
#define SL_USBD_DESC_TYPE_STRINGValue:
3u
146
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_INTERFACE#
#define SL_USBD_DESC_TYPE_INTERFACEValue:
4u
147
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_ENDPOINT#
#define SL_USBD_DESC_TYPE_ENDPOINTValue:
5u
148
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_DEVICE_QUALIFIER#
#define SL_USBD_DESC_TYPE_DEVICE_QUALIFIERValue:
6u
149
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_OTHER_SPEED_CONFIGURATION#
#define SL_USBD_DESC_TYPE_OTHER_SPEED_CONFIGURATIONValue:
7u
150
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_INTERFACE_POWER#
#define SL_USBD_DESC_TYPE_INTERFACE_POWERValue:
8u
151
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_OTG#
#define SL_USBD_DESC_TYPE_OTGValue:
9u
152
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_DESC_TYPE_IAD#
#define SL_USBD_DESC_TYPE_IADValue:
11u
153
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_ARABIC_SAUDI_ARABIA#
#define SL_USBD_LANG_ID_ARABIC_SAUDI_ARABIAValue:
0x0401u
LANGUAGE IDENTIFIERS
Note(s) : (1) Languages identifier are defined in "http://www.usb.org/developers/docs/USB_LANGIDs.pdf".
161
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_CHINESE_TAIWAN#
#define SL_USBD_LANG_ID_CHINESE_TAIWANValue:
0x0404u
162
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_ENGLISH_US#
#define SL_USBD_LANG_ID_ENGLISH_USValue:
0x0409u
163
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_ENGLISH_UK#
#define SL_USBD_LANG_ID_ENGLISH_UKValue:
0x0809u
164
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_FRENCH#
#define SL_USBD_LANG_ID_FRENCHValue:
0x040Cu
165
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_GERMAN#
#define SL_USBD_LANG_ID_GERMANValue:
0x0407u
166
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_GREEK#
#define SL_USBD_LANG_ID_GREEKValue:
0x0408u
167
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_ITALIAN#
#define SL_USBD_LANG_ID_ITALIANValue:
0x0410u
168
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_PORTUGUESE#
#define SL_USBD_LANG_ID_PORTUGUESEValue:
0x0816u
169
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_LANG_ID_SANSKRIT#
#define SL_USBD_LANG_ID_SANSKRITValue:
0x044Fu
170
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_USE_IF_DESC#
#define SL_USBD_CLASS_CODE_USE_IF_DESCValue:
0x00u
CLASS CODES
Note(s) : (1) Class codes are defined in "http://www.usb.org/developers/defined_class".
(2) Class code information can be placed in the Device descriptor or in the Interface
descriptor. Some defined class code are allowed to be used only in the Device
descriptor, others can used in both Device and Interface descriptors and come can
only be used in Interface Descriptors.
(3) Subclass & protocol codes are defined in the relevant class drivers.
185
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_AUDIO#
#define SL_USBD_CLASS_CODE_AUDIOValue:
0x01u
186
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_CDC_CONTROL#
#define SL_USBD_CLASS_CODE_CDC_CONTROLValue:
0x02u
187
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_HID#
#define SL_USBD_CLASS_CODE_HIDValue:
0x03u
188
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_PHYSICAL#
#define SL_USBD_CLASS_CODE_PHYSICALValue:
0x05u
189
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_IMAGE#
#define SL_USBD_CLASS_CODE_IMAGEValue:
0x06u
190
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_PRINTER#
#define SL_USBD_CLASS_CODE_PRINTERValue:
0x07u
191
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_MASS_STORAGE#
#define SL_USBD_CLASS_CODE_MASS_STORAGEValue:
0x08u
192
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_HUB#
#define SL_USBD_CLASS_CODE_HUBValue:
0x09u
193
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_CDC_DATA#
#define SL_USBD_CLASS_CODE_CDC_DATAValue:
0x0Au
194
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_SMART_CARD#
#define SL_USBD_CLASS_CODE_SMART_CARDValue:
0x0Bu
195
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_CONTENT_SECURITY#
#define SL_USBD_CLASS_CODE_CONTENT_SECURITYValue:
0x0Du
196
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_VIDEO#
#define SL_USBD_CLASS_CODE_VIDEOValue:
0x0Eu
197
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_PERSONAL_HEALTHCARE#
#define SL_USBD_CLASS_CODE_PERSONAL_HEALTHCAREValue:
0x0Fu
198
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_DIAGNOSTIC_DEVICE#
#define SL_USBD_CLASS_CODE_DIAGNOSTIC_DEVICEValue:
0xDCu
199
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_WIRELESS_CONTROLLER#
#define SL_USBD_CLASS_CODE_WIRELESS_CONTROLLERValue:
0xE0u
200
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_MISCELLANEOUS#
#define SL_USBD_CLASS_CODE_MISCELLANEOUSValue:
0xEFu
201
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_APPLICATION_SPECIFIC#
#define SL_USBD_CLASS_CODE_APPLICATION_SPECIFICValue:
0xFEu
202
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_CODE_VENDOR_SPECIFIC#
#define SL_USBD_CLASS_CODE_VENDOR_SPECIFICValue:
0xFFu
203
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_SUBCLASS_CODE_USE_IF_DESC#
#define SL_USBD_SUBCLASS_CODE_USE_IF_DESCValue:
0x00u
SUB-CLASS CODES.
209
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_SUBCLASS_CODE_USE_COMMON_CLASS#
#define SL_USBD_SUBCLASS_CODE_USE_COMMON_CLASSValue:
0x02u
210
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_SUBCLASS_CODE_VENDOR_SPECIFIC#
#define SL_USBD_SUBCLASS_CODE_VENDOR_SPECIFICValue:
0xFFu
211
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_PROTOCOL_CODE_USE_IF_DESC#
#define SL_USBD_PROTOCOL_CODE_USE_IF_DESCValue:
0x00u
PROTOCOL CODES.
217
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_PROTOCOL_CODE_USE_IAD#
#define SL_USBD_PROTOCOL_CODE_USE_IADValue:
0x01u
218
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_PROTOCOL_CODE_VENDOR_SPECIFIC#
#define SL_USBD_PROTOCOL_CODE_VENDOR_SPECIFICValue:
0xFFu
219
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FEATURE_SEL_ENDPOINT_HALT#
#define SL_USBD_FEATURE_SEL_ENDPOINT_HALTValue:
0u
FEATURE SELECTORS.
225
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FEATURE_SEL_DEVICE_REMOTE_WAKEUP#
#define SL_USBD_FEATURE_SEL_DEVICE_REMOTE_WAKEUPValue:
1u
226
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FEATURE_SEL_TEST_MODE#
#define SL_USBD_FEATURE_SEL_TEST_MODEValue:
2u
227
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MAX_BUS_PWR_LIMIT_mA#
#define SL_USBD_MAX_BUS_PWR_LIMIT_mAValue:
500u
DEVICE POWER CONSTRAINS.
233
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_MASK#
#define SL_USBD_ENDPOINT_TYPE_MASKValue:
0x03u
ENDPOINT TYPE.
Note(s) : (1) Endpoint types are defined in the USB spec 2.0 section 9.6.6, Table 9-13, 'bmAttributes' field.
242
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_CTRL#
#define SL_USBD_ENDPOINT_TYPE_CTRLValue:
0x00u
243
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_ISOC#
#define SL_USBD_ENDPOINT_TYPE_ISOCValue:
0x01u
244
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_BULK#
#define SL_USBD_ENDPOINT_TYPE_BULKValue:
0x02u
245
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_INTR#
#define SL_USBD_ENDPOINT_TYPE_INTRValue:
0x03u
246
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_SYNC_MASK#
#define SL_USBD_ENDPOINT_TYPE_SYNC_MASKValue:
0x0Cu
248
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_SYNC_NONE#
#define SL_USBD_ENDPOINT_TYPE_SYNC_NONEValue:
0x00u
249
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_SYNC_ASYNC#
#define SL_USBD_ENDPOINT_TYPE_SYNC_ASYNCValue:
0x04u
250
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_SYNC_ADAPTIVE#
#define SL_USBD_ENDPOINT_TYPE_SYNC_ADAPTIVEValue:
0x08u
251
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_SYNC_SYNC#
#define SL_USBD_ENDPOINT_TYPE_SYNC_SYNCValue:
0x0Cu
252
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_USAGE_MASK#
#define SL_USBD_ENDPOINT_TYPE_USAGE_MASKValue:
0x30u
254
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_USAGE_DATA#
#define SL_USBD_ENDPOINT_TYPE_USAGE_DATAValue:
0x00u
255
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_USAGE_FEEDBACK#
#define SL_USBD_ENDPOINT_TYPE_USAGE_FEEDBACKValue:
0x10u
256
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TYPE_USAGE_IMPLICIT_FEEDBACK#
#define SL_USBD_ENDPOINT_TYPE_USAGE_IMPLICIT_FEEDBACKValue:
0x20u
257
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_NBR_MASK#
#define SL_USBD_ENDPOINT_NBR_MASKValue:
0x0Fu
ENDPOINT ADDRESS.
Note(s) : (1) Endpoint address is defined in the USB spec 2.0, section 9.6.6, Table 9-13, 'bEndpointAddress' field.
266
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_MAX_NBR#
#define SL_USBD_ENDPOINT_MAX_NBRValue:
32u
267
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_DIR_MASK#
#define SL_USBD_ENDPOINT_DIR_MASKValue:
0x80u
269
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_DIR_BIT#
#define SL_USBD_ENDPOINT_DIR_BITValue:
0x80u
270
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_DIR_OUT#
#define SL_USBD_ENDPOINT_DIR_OUTValue:
0x00u
271
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_DIR_IN#
#define SL_USBD_ENDPOINT_DIR_INValue:
0x80u
272
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_1#
#define SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_1Value:
1u
274
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_2#
#define SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_2Value:
2u
275
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_3#
#define SL_USBD_ENDPOINT_TRANSACTION_PER_UFRAME_3Value:
3u
276
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_MAX_INTERVAL_VAL#
#define SL_USBD_ENDPOINT_MAX_INTERVAL_VALValue:
32768u
278
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_NULL#
#define SL_USBD_MICROSOFT_COMPAT_ID_NULLValue:
0u
MICROSOFT OS DESCRIPTOR DEFINES.
Note(s) : (1) For more information on Microsoft OS descriptors, see 'http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx'.
288
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_RNDIS#
#define SL_USBD_MICROSOFT_COMPAT_ID_RNDISValue:
1u
289
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_PTP#
#define SL_USBD_MICROSOFT_COMPAT_ID_PTPValue:
2u
290
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_MTP#
#define SL_USBD_MICROSOFT_COMPAT_ID_MTPValue:
3u
291
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_XUSB20#
#define SL_USBD_MICROSOFT_COMPAT_ID_XUSB20Value:
4u
292
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_BLUETOOTH#
#define SL_USBD_MICROSOFT_COMPAT_ID_BLUETOOTHValue:
5u
293
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_WINUSB#
#define SL_USBD_MICROSOFT_COMPAT_ID_WINUSBValue:
6u
294
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_COMPAT_ID_NONE#
#define SL_USBD_MICROSOFT_COMPAT_ID_NONEValue:
255u
295
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_SUBCOMPAT_ID_NULL#
#define SL_USBD_MICROSOFT_SUBCOMPAT_ID_NULLValue:
0u
298
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_1_1#
#define SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_1_1Value:
1u
299
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_1_2#
#define SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_1_2Value:
2u
300
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_EDR#
#define SL_USBD_MICROSOFT_SUBCOMPAT_ID_BLUETOOTH_EDRValue:
3u
301
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_SZ#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_SZValue:
1u
304
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_EXPAND_SZ#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_EXPAND_SZValue:
2u
305
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_BINARY#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_BINARYValue:
3u
306
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_DWORD_LITTLE_ENDIAN#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_DWORD_LITTLE_ENDIANValue:
4u
307
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_DWORD_BIG_ENDIAN#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_DWORD_BIG_ENDIANValue:
5u
308
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_LINK#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_LINKValue:
6u
309
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_MULTI_SZ#
#define SL_USBD_MICROSOFT_PROPERTY_TYPE_REG_MULTI_SZValue:
7u
310
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_TYPE_CTRL#
#define SL_USBD_ENDPOINT_INFO_TYPE_CTRLValue:
0x01u
USB EP INFORMATION TABLE DEFINES.
317
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_TYPE_ISOC#
#define SL_USBD_ENDPOINT_INFO_TYPE_ISOCValue:
0x02u
318
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_TYPE_BULK#
#define SL_USBD_ENDPOINT_INFO_TYPE_BULKValue:
0x04u
319
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_TYPE_INTR#
#define SL_USBD_ENDPOINT_INFO_TYPE_INTRValue:
0x08u
320
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_DIR_OUT#
#define SL_USBD_ENDPOINT_INFO_DIR_OUTValue:
0x10u
323
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_INFO_DIR_IN#
#define SL_USBD_ENDPOINT_INFO_DIR_INValue:
0x20u
324
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CONFIG_NBR_NONE#
#define SL_USBD_CONFIG_NBR_NONEValue:
255u
USB OBJECT NUMBER.
330
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CONFIG_NBR_SPD_BIT#
#define SL_USBD_CONFIG_NBR_SPD_BITValue:
0x80u
331
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_INTERFACE_NBR_NONE#
#define SL_USBD_INTERFACE_NBR_NONEValue:
255u
333
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ALT_INTERFACE_NBR_NONE#
#define SL_USBD_ALT_INTERFACE_NBR_NONEValue:
255u
335
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_INTERFACE_GROUP_NBR_NONE#
#define SL_USBD_INTERFACE_GROUP_NBR_NONEValue:
255u
337
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_ADDR_NONE#
#define SL_USBD_ENDPOINT_ADDR_NONEValue:
255u
339
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_PHY_NONE#
#define SL_USBD_ENDPOINT_PHY_NONEValue:
255u
340
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_NBR_NONE#
#define SL_USBD_ENDPOINT_NBR_NONEValue:
255u
342
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CLASS_NBR_NONE#
#define SL_USBD_CLASS_NBR_NONEValue:
255u
344
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_STR_EN#
#define USBD_CFG_STR_ENValue:
1
USB DEFAULT CONFIGS.
351
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_MS_OS_DESC_EN#
#define USBD_CFG_MS_OS_DESC_ENValue:
0
355
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_URB_EXTRA_EN#
#define USBD_CFG_URB_EXTRA_ENValue:
0
359
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_URB_MAX_NBR#
#define SL_USBD_URB_MAX_NBRValue:
SL_USBD_OPEN_ENDPOINTS_QUANTITY
365
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_HS_EN#
#define USBD_CFG_HS_ENValue:
0
369
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_EP_ISOC_EN#
#define USBD_CFG_EP_ISOC_ENValue:
0
373
of file protocol/usb/inc/sl_usbd_core.h
USBD_CFG_OPTIMIZE_SPD#
#define USBD_CFG_OPTIMIZE_SPDValue:
0
377
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CORE_EVENT_BUS_NBR#
#define SL_USBD_CORE_EVENT_BUS_NBRValue:
7u
USB CORE EVENTS.
Note(s) : (1) There are 7 possible USB callback events:
sli_usbd_core_reset_event(),
sli_usbd_core_suspend_event(),
sli_usbd_core_resume_event(),
sli_usbd_core_connect_event(),
sli_usbd_core_disconnect_event(),
sli_usbd_core_high_speed_event().
393
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CORE_EVENT_BUS_NBR_TOTAL#
#define SL_USBD_CORE_EVENT_BUS_NBR_TOTALValue:
(SL_USBD_CORE_EVENT_BUS_NBR * SL_USBD_DEVICE_QUANTITY)
395
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CORE_EVENT_ASYNC_NBR#
#define SL_USBD_CORE_EVENT_ASYNC_NBRValue:
((SL_USBD_OPEN_ENDPOINTS_QUANTITY * SL_USBD_DEVICE_QUANTITY) + SL_USBD_EXTRA_URB_QUANTITY)
396
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_CORE_EVENT_NBR_TOTAL#
#define SL_USBD_CORE_EVENT_NBR_TOTALValue:
(SL_USBD_CORE_EVENT_BUS_NBR_TOTAL + SL_USBD_CORE_EVENT_ASYNC_NBR)
397
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FRAME_NBR_GET#
#define SL_USBD_FRAME_NBR_GETValue:
(frame_nbr)
GLOBAL CONSTANTS.
MACROS FRAME MACROS
Note(s) : (1) This macro takes into account when the frame number rolls over upon reaching the maximum value of 2047.
614
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_MICROFRAME_NBR_GET#
#define SL_USBD_MICROFRAME_NBR_GETValue:
(microframe_nbr)
616
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_FRAME_NBR_DIFF_GET#
#define SL_USBD_FRAME_NBR_DIFF_GETValue:
619
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_PHY_TO_ADDR#
#define SL_USBD_ENDPOINT_PHY_TO_ADDRValue:
ENDPOINT CONVERSION MACROS.
627
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_ADDR_TO_PHY#
#define SL_USBD_ENDPOINT_ADDR_TO_PHYValue:
630
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_ADDR_TO_LOG#
#define SL_USBD_ENDPOINT_ADDR_TO_LOGValue:
(ep_addr)
633
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_PHY_TO_LOG#
#define SL_USBD_ENDPOINT_PHY_TO_LOGValue:
(ep_phy_nbr)
635
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_LOG_TO_ADDR_IN#
#define SL_USBD_ENDPOINT_LOG_TO_ADDR_INValue:
(ep_log_nbr)
637
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_LOG_TO_ADDR_OUT#
#define SL_USBD_ENDPOINT_LOG_TO_ADDR_OUTValue:
(ep_log_nbr)
639
of file protocol/usb/inc/sl_usbd_core.h
SL_USBD_ENDPOINT_IS_IN#
#define SL_USBD_ENDPOINT_IS_INValue:
(ep_addr)
641
of file protocol/usb/inc/sl_usbd_core.h