You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 KiB

group udc_group_interne

Internal implementation

Summary

Members Descriptions
public usb_iface_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__iface__desc__t)[UDC_DESC_STORAGE*udc_get_interface_desc(void) Returns a pointer on the current interface descriptor.
public static usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE*udc_get_eof_conf(void) Returns a value to check the end of USB Configuration descriptor.
public static usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE*udc_next_desc_in_iface(usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE * desc,uint8_t desc_id) Search specific descriptor in global interface descriptor.
public static bool udc_update_iface_desc(uint8_t iface_num,uint8_t setting_num) Search an interface descriptor This routine updates the internal pointer udc_ptr_iface.
public static bool udc_iface_disable(uint8_t iface_num) Disables an usb device interface (UDI) This routine call the UDI corresponding to interface number.
public static bool udc_iface_enable(uint8_t iface_num,uint8_t setting_num) Enables an usb device interface (UDI) This routine calls the UDI corresponding to the interface and setting number.
public void udc_start(void) Start the USB Device stack.
public void udc_stop(void) Stop the USB Device stack.
public void udc_reset(void) Reset the current configuration of the USB device, This routines can be called by UDD when a RESET on the USB line occurs.
public void udc_sof_notify(void) To signal that a SOF is occurred.
public static bool udc_req_std_dev_get_status(void) Standard device request to get device status.
public static bool udc_req_std_ep_get_status(void) Standard endpoint request to get endpoint status.
public static bool udc_req_std_dev_clear_feature(void) Standard device request to change device status.
public static bool udc_req_std_ep_clear_feature(void) Standard endpoint request to clear endpoint feature.
public static bool udc_req_std_dev_set_feature(void) Standard device request to set a feature.
public static bool udc_req_std_ep_set_feature(void) Standard endpoint request to halt an endpoint.
public static void udc_valid_address(void) Change the address of device Callback called at the end of request set address.
public static bool udc_req_std_dev_set_address(void) Standard device request to set device address.
public static bool udc_req_std_dev_get_str_desc(void) Standard device request to get device string descriptor.
public static bool udc_req_std_dev_get_descriptor(void) Standard device request to get descriptors about USB device.
public static bool udc_req_std_dev_get_configuration(void) Standard device request to get configuration number.
public static bool udc_req_std_dev_set_configuration(void) Standard device request to enable a configuration.
public static bool udc_req_std_iface_get_setting(void) Standard interface request to get the alternate setting number of an interface.
public static bool udc_req_std_iface_set_setting(void) Standard interface request to set an alternate setting of an interface.
public static bool udc_reqstd(void) Main routine to manage the standard USB SETUP request.
public static bool udc_req_iface(void) Send the SETUP interface request to UDI.
public static bool udc_req_ep(void) Send the SETUP interface request to UDI.
public bool udc_process_setup(void) Main routine to manage the USB SETUP request.
struct udc_string_desc_t

Members

public usb_iface_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__iface__desc__t)[UDC_DESC_STORAGE*udc_get_interface_desc(void)

Returns a pointer on the current interface descriptor.

Returns

pointer on the current interface descriptor.

public static usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE*udc_get_eof_conf(void)

Returns a value to check the end of USB Configuration descriptor.

Returns

address after the last byte of USB Configuration descriptor

public static usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE*udc_next_desc_in_iface(usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE * desc,uint8_t desc_id)

Search specific descriptor in global interface descriptor.

Parameters

  • desc Address of interface descriptor or previous specific descriptor found

  • desc_id Descriptor ID to search

Returns

address of specific descriptor found

Returns

NULL if it is the end of global interface descriptor

public static bool udc_update_iface_desc(uint8_t iface_num,uint8_t setting_num)

Search an interface descriptor This routine updates the internal pointer udc_ptr_iface.

Parameters

  • iface_num Interface number to find in Configuration Descriptor

  • setting_num Setting number of interface to find

Returns

1 if found or 0 if not found

public static bool udc_iface_disable(uint8_t iface_num)

Disables an usb device interface (UDI) This routine call the UDI corresponding to interface number.

Parameters

  • iface_num Interface number to disable

Returns

1 if it is done or 0 if interface is not found

public static bool udc_iface_enable(uint8_t iface_num,uint8_t setting_num)

Enables an usb device interface (UDI) This routine calls the UDI corresponding to the interface and setting number.

Parameters

  • iface_num Interface number to enable

  • setting_num Setting number to enable

Returns

1 if it is done or 0 if interface is not found

public void udc_start(void)

Start the USB Device stack.

public void udc_stop(void)

Stop the USB Device stack.

public void udc_reset(void)

Reset the current configuration of the USB device, This routines can be called by UDD when a RESET on the USB line occurs.

Reset the UDC.

public void udc_sof_notify(void)

To signal that a SOF is occurred.

The UDC must send the signal to all UDIs enabled

public static bool udc_req_std_dev_get_status(void)

Standard device request to get device status.

Returns

true if success

public static bool udc_req_std_ep_get_status(void)

Standard endpoint request to get endpoint status.

Returns

true if success

public static bool udc_req_std_dev_clear_feature(void)

Standard device request to change device status.

Returns

true if success

public static bool udc_req_std_ep_clear_feature(void)

Standard endpoint request to clear endpoint feature.

Returns

true if success

public static bool udc_req_std_dev_set_feature(void)

Standard device request to set a feature.

Returns

true if success

public static bool udc_req_std_ep_set_feature(void)

Standard endpoint request to halt an endpoint.

Returns

true if success

public static void udc_valid_address(void)

Change the address of device Callback called at the end of request set address.

public static bool udc_req_std_dev_set_address(void)

Standard device request to set device address.

Returns

true if success

public static bool udc_req_std_dev_get_str_desc(void)

Standard device request to get device string descriptor.

Returns

true if success

public static bool udc_req_std_dev_get_descriptor(void)

Standard device request to get descriptors about USB device.

Returns

true if success

public static bool udc_req_std_dev_get_configuration(void)

Standard device request to get configuration number.

Returns

true if success

public static bool udc_req_std_dev_set_configuration(void)

Standard device request to enable a configuration.

Returns

true if success

public static bool udc_req_std_iface_get_setting(void)

Standard interface request to get the alternate setting number of an interface.

Returns

true if success

public static bool udc_req_std_iface_set_setting(void)

Standard interface request to set an alternate setting of an interface.

Returns

true if success

public static bool udc_reqstd(void)

Main routine to manage the standard USB SETUP request.

Returns

true if the request is supported

public static bool udc_req_iface(void)

Send the SETUP interface request to UDI.

Returns

true if the request is supported

public static bool udc_req_ep(void)

Send the SETUP interface request to UDI.

Returns

true if the request is supported

public bool udc_process_setup(void)

Main routine to manage the USB SETUP request.

Decodes and manages a setup request.

This function parses a USB SETUP request and submits an appropriate response back to the host or, in the case of SETUP OUT requests with data, sets up a buffer for receiving the data payload.

The main standard requests defined by the USB 2.0 standard are handled internally. The interface requests are sent to UDI, and the specific request sent to a specific application callback.

Returns

true if the request is supported, else the request is stalled by UDD

struct udc_string_desc_t

Summary

Members Descriptions
public usb_str_desc_t header
public le16_t string

Members

public usb_str_desc_t header

public le16_t string