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.

267 lines
17 KiB

  1. # group `udc_group_interne` {#group__udc__group__interne}
  2. Internal implementation
  3. ## Summary
  4. Members | Descriptions
  5. --------------------------------|---------------------------------------------
  6. `public `[`usb_iface_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__iface__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_get_interface_desc`](#group__udc__group__interne_1gadb2a0f5ad1e834d4d7e7777f901d64d2)`(void)` | Returns a pointer on the current interface descriptor.
  7. `public static `[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_get_eof_conf`](#group__udc__group__interne_1ga3442594fd7435c3803460847014c8970)`(void)` | Returns a value to check the end of USB Configuration descriptor.
  8. `public static `[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_next_desc_in_iface`](#group__udc__group__interne_1ga5b377861e784ec69c3e841643169a981)`(`[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * desc,uint8_t desc_id)` | Search specific descriptor in global interface descriptor.
  9. `public static bool `[`udc_update_iface_desc`](#group__udc__group__interne_1gab6a52be155f35da55d33d3474f06cc47)`(uint8_t iface_num,uint8_t setting_num)` | Search an interface descriptor This routine updates the internal pointer udc_ptr_iface.
  10. `public static bool `[`udc_iface_disable`](#group__udc__group__interne_1ga4d8c4886411e5f90adaac8bff065c610)`(uint8_t iface_num)` | Disables an usb device interface (UDI) This routine call the UDI corresponding to interface number.
  11. `public static bool `[`udc_iface_enable`](#group__udc__group__interne_1gab7d44215050fc758b44c86dc88a16264)`(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.
  12. `public void `[`udc_start`](#group__udc__group__interne_1gadf4e193509cd03ab6333d62629ea51e7)`(void)` | Start the USB Device stack.
  13. `public void `[`udc_stop`](#group__udc__group__interne_1gae2264dd91b24db9d4bb23fb1a2014972)`(void)` | Stop the USB Device stack.
  14. `public void `[`udc_reset`](#group__udc__group__interne_1ga11a32ff7928ba06d3b59e95e0a2b7a92)`(void)` | Reset the current configuration of the USB device, This routines can be called by UDD when a RESET on the USB line occurs.
  15. `public void `[`udc_sof_notify`](#group__udc__group__interne_1ga4afae313045f44b5eb4c60957ab8ef4e)`(void)` | To signal that a SOF is occurred.
  16. `public static bool `[`udc_req_std_dev_get_status`](#group__udc__group__interne_1gad6531ffd8e25d5b7492a7a7f4f89ea3f)`(void)` | Standard device request to get device status.
  17. `public static bool `[`udc_req_std_ep_get_status`](#group__udc__group__interne_1ga97951f0c157b56a0bdb2c1ee01ef28c7)`(void)` | Standard endpoint request to get endpoint status.
  18. `public static bool `[`udc_req_std_dev_clear_feature`](#group__udc__group__interne_1gace4de90bb4ef13b7aede71038a5e1dcb)`(void)` | Standard device request to change device status.
  19. `public static bool `[`udc_req_std_ep_clear_feature`](#group__udc__group__interne_1ga59d4bc22153641a20eb48f8407e9c099)`(void)` | Standard endpoint request to clear endpoint feature.
  20. `public static bool `[`udc_req_std_dev_set_feature`](#group__udc__group__interne_1gadd42bf8a4178b3e06f78966a6323108d)`(void)` | Standard device request to set a feature.
  21. `public static bool `[`udc_req_std_ep_set_feature`](#group__udc__group__interne_1ga11f8eef1ab88fe1d029414f039508661)`(void)` | Standard endpoint request to halt an endpoint.
  22. `public static void `[`udc_valid_address`](#group__udc__group__interne_1ga8b6715772a604a998846a3aa97c042c2)`(void)` | Change the address of device Callback called at the end of request set address.
  23. `public static bool `[`udc_req_std_dev_set_address`](#group__udc__group__interne_1gaa800b0a860337f155b43b86444f43809)`(void)` | Standard device request to set device address.
  24. `public static bool `[`udc_req_std_dev_get_str_desc`](#group__udc__group__interne_1gaf13a0b91b1ec15e4aae33a7d5df2be64)`(void)` | Standard device request to get device string descriptor.
  25. `public static bool `[`udc_req_std_dev_get_descriptor`](#group__udc__group__interne_1gae46c685525dbe2a47ed7acdabda5f094)`(void)` | Standard device request to get descriptors about USB device.
  26. `public static bool `[`udc_req_std_dev_get_configuration`](#group__udc__group__interne_1gadd826de0797aae1e872f44a6a9ee81da)`(void)` | Standard device request to get configuration number.
  27. `public static bool `[`udc_req_std_dev_set_configuration`](#group__udc__group__interne_1ga0da31a19fcd81e03a9b0d6ba17a2cdc4)`(void)` | Standard device request to enable a configuration.
  28. `public static bool `[`udc_req_std_iface_get_setting`](#group__udc__group__interne_1gac9f53c587375a24ac6b63206d650f36c)`(void)` | Standard interface request to get the alternate setting number of an interface.
  29. `public static bool `[`udc_req_std_iface_set_setting`](#group__udc__group__interne_1gad06f93d41064705e7f6fd992fef1230f)`(void)` | Standard interface request to set an alternate setting of an interface.
  30. `public static bool `[`udc_reqstd`](#group__udc__group__interne_1gac82ad471b5bfa644309f98815757c867)`(void)` | Main routine to manage the standard USB SETUP request.
  31. `public static bool `[`udc_req_iface`](#group__udc__group__interne_1ga920a557a9121c44513deceb2f9358fc1)`(void)` | Send the SETUP interface request to UDI.
  32. `public static bool `[`udc_req_ep`](#group__udc__group__interne_1ga640a2df7bb1c1fbed895286a8513663c)`(void)` | Send the SETUP interface request to UDI.
  33. `public bool `[`udc_process_setup`](#group__udc__group__interne_1ga58c2916d7984e0e5b2143cadf4af6080)`(void)` | Main routine to manage the USB SETUP request.
  34. `struct `[`udc_string_desc_t`](#structudc__string__desc__t) |
  35. ## Members
  36. #### `public `[`usb_iface_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__iface__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_get_interface_desc`](#group__udc__group__interne_1gadb2a0f5ad1e834d4d7e7777f901d64d2)`(void)` {#group__udc__group__interne_1gadb2a0f5ad1e834d4d7e7777f901d64d2}
  37. Returns a pointer on the current interface descriptor.
  38. #### Returns
  39. pointer on the current interface descriptor.
  40. #### `public static `[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_get_eof_conf`](#group__udc__group__interne_1ga3442594fd7435c3803460847014c8970)`(void)` {#group__udc__group__interne_1ga3442594fd7435c3803460847014c8970}
  41. Returns a value to check the end of USB Configuration descriptor.
  42. #### Returns
  43. address after the last byte of USB Configuration descriptor
  44. #### `public static `[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * `[`udc_next_desc_in_iface`](#group__udc__group__interne_1ga5b377861e784ec69c3e841643169a981)`(`[`usb_conf_desc_t](.build/docs/internals_usb_protocol_group.md#structusb__conf__desc__t)[UDC_DESC_STORAGE`](.build/docs/internals_undefined.md#group__udc__desc__group_1gae086959cec07a2e71ab069e25a51764f)` * desc,uint8_t desc_id)` {#group__udc__group__interne_1ga5b377861e784ec69c3e841643169a981}
  45. Search specific descriptor in global interface descriptor.
  46. #### Parameters
  47. * `desc` Address of interface descriptor or previous specific descriptor found
  48. * `desc_id` Descriptor ID to search
  49. #### Returns
  50. address of specific descriptor found
  51. #### Returns
  52. NULL if it is the end of global interface descriptor
  53. #### `public static bool `[`udc_update_iface_desc`](#group__udc__group__interne_1gab6a52be155f35da55d33d3474f06cc47)`(uint8_t iface_num,uint8_t setting_num)` {#group__udc__group__interne_1gab6a52be155f35da55d33d3474f06cc47}
  54. Search an interface descriptor This routine updates the internal pointer udc_ptr_iface.
  55. #### Parameters
  56. * `iface_num` Interface number to find in Configuration Descriptor
  57. * `setting_num` Setting number of interface to find
  58. #### Returns
  59. 1 if found or 0 if not found
  60. #### `public static bool `[`udc_iface_disable`](#group__udc__group__interne_1ga4d8c4886411e5f90adaac8bff065c610)`(uint8_t iface_num)` {#group__udc__group__interne_1ga4d8c4886411e5f90adaac8bff065c610}
  61. Disables an usb device interface (UDI) This routine call the UDI corresponding to interface number.
  62. #### Parameters
  63. * `iface_num` Interface number to disable
  64. #### Returns
  65. 1 if it is done or 0 if interface is not found
  66. #### `public static bool `[`udc_iface_enable`](#group__udc__group__interne_1gab7d44215050fc758b44c86dc88a16264)`(uint8_t iface_num,uint8_t setting_num)` {#group__udc__group__interne_1gab7d44215050fc758b44c86dc88a16264}
  67. Enables an usb device interface (UDI) This routine calls the UDI corresponding to the interface and setting number.
  68. #### Parameters
  69. * `iface_num` Interface number to enable
  70. * `setting_num` Setting number to enable
  71. #### Returns
  72. 1 if it is done or 0 if interface is not found
  73. #### `public void `[`udc_start`](#group__udc__group__interne_1gadf4e193509cd03ab6333d62629ea51e7)`(void)` {#group__udc__group__interne_1gadf4e193509cd03ab6333d62629ea51e7}
  74. Start the USB Device stack.
  75. #### `public void `[`udc_stop`](#group__udc__group__interne_1gae2264dd91b24db9d4bb23fb1a2014972)`(void)` {#group__udc__group__interne_1gae2264dd91b24db9d4bb23fb1a2014972}
  76. Stop the USB Device stack.
  77. #### `public void `[`udc_reset`](#group__udc__group__interne_1ga11a32ff7928ba06d3b59e95e0a2b7a92)`(void)` {#group__udc__group__interne_1ga11a32ff7928ba06d3b59e95e0a2b7a92}
  78. Reset the current configuration of the USB device, This routines can be called by UDD when a RESET on the USB line occurs.
  79. Reset the UDC.
  80. #### `public void `[`udc_sof_notify`](#group__udc__group__interne_1ga4afae313045f44b5eb4c60957ab8ef4e)`(void)` {#group__udc__group__interne_1ga4afae313045f44b5eb4c60957ab8ef4e}
  81. To signal that a SOF is occurred.
  82. The UDC must send the signal to all UDIs enabled
  83. #### `public static bool `[`udc_req_std_dev_get_status`](#group__udc__group__interne_1gad6531ffd8e25d5b7492a7a7f4f89ea3f)`(void)` {#group__udc__group__interne_1gad6531ffd8e25d5b7492a7a7f4f89ea3f}
  84. Standard device request to get device status.
  85. #### Returns
  86. true if success
  87. #### `public static bool `[`udc_req_std_ep_get_status`](#group__udc__group__interne_1ga97951f0c157b56a0bdb2c1ee01ef28c7)`(void)` {#group__udc__group__interne_1ga97951f0c157b56a0bdb2c1ee01ef28c7}
  88. Standard endpoint request to get endpoint status.
  89. #### Returns
  90. true if success
  91. #### `public static bool `[`udc_req_std_dev_clear_feature`](#group__udc__group__interne_1gace4de90bb4ef13b7aede71038a5e1dcb)`(void)` {#group__udc__group__interne_1gace4de90bb4ef13b7aede71038a5e1dcb}
  92. Standard device request to change device status.
  93. #### Returns
  94. true if success
  95. #### `public static bool `[`udc_req_std_ep_clear_feature`](#group__udc__group__interne_1ga59d4bc22153641a20eb48f8407e9c099)`(void)` {#group__udc__group__interne_1ga59d4bc22153641a20eb48f8407e9c099}
  96. Standard endpoint request to clear endpoint feature.
  97. #### Returns
  98. true if success
  99. #### `public static bool `[`udc_req_std_dev_set_feature`](#group__udc__group__interne_1gadd42bf8a4178b3e06f78966a6323108d)`(void)` {#group__udc__group__interne_1gadd42bf8a4178b3e06f78966a6323108d}
  100. Standard device request to set a feature.
  101. #### Returns
  102. true if success
  103. #### `public static bool `[`udc_req_std_ep_set_feature`](#group__udc__group__interne_1ga11f8eef1ab88fe1d029414f039508661)`(void)` {#group__udc__group__interne_1ga11f8eef1ab88fe1d029414f039508661}
  104. Standard endpoint request to halt an endpoint.
  105. #### Returns
  106. true if success
  107. #### `public static void `[`udc_valid_address`](#group__udc__group__interne_1ga8b6715772a604a998846a3aa97c042c2)`(void)` {#group__udc__group__interne_1ga8b6715772a604a998846a3aa97c042c2}
  108. Change the address of device Callback called at the end of request set address.
  109. #### `public static bool `[`udc_req_std_dev_set_address`](#group__udc__group__interne_1gaa800b0a860337f155b43b86444f43809)`(void)` {#group__udc__group__interne_1gaa800b0a860337f155b43b86444f43809}
  110. Standard device request to set device address.
  111. #### Returns
  112. true if success
  113. #### `public static bool `[`udc_req_std_dev_get_str_desc`](#group__udc__group__interne_1gaf13a0b91b1ec15e4aae33a7d5df2be64)`(void)` {#group__udc__group__interne_1gaf13a0b91b1ec15e4aae33a7d5df2be64}
  114. Standard device request to get device string descriptor.
  115. #### Returns
  116. true if success
  117. #### `public static bool `[`udc_req_std_dev_get_descriptor`](#group__udc__group__interne_1gae46c685525dbe2a47ed7acdabda5f094)`(void)` {#group__udc__group__interne_1gae46c685525dbe2a47ed7acdabda5f094}
  118. Standard device request to get descriptors about USB device.
  119. #### Returns
  120. true if success
  121. #### `public static bool `[`udc_req_std_dev_get_configuration`](#group__udc__group__interne_1gadd826de0797aae1e872f44a6a9ee81da)`(void)` {#group__udc__group__interne_1gadd826de0797aae1e872f44a6a9ee81da}
  122. Standard device request to get configuration number.
  123. #### Returns
  124. true if success
  125. #### `public static bool `[`udc_req_std_dev_set_configuration`](#group__udc__group__interne_1ga0da31a19fcd81e03a9b0d6ba17a2cdc4)`(void)` {#group__udc__group__interne_1ga0da31a19fcd81e03a9b0d6ba17a2cdc4}
  126. Standard device request to enable a configuration.
  127. #### Returns
  128. true if success
  129. #### `public static bool `[`udc_req_std_iface_get_setting`](#group__udc__group__interne_1gac9f53c587375a24ac6b63206d650f36c)`(void)` {#group__udc__group__interne_1gac9f53c587375a24ac6b63206d650f36c}
  130. Standard interface request to get the alternate setting number of an interface.
  131. #### Returns
  132. true if success
  133. #### `public static bool `[`udc_req_std_iface_set_setting`](#group__udc__group__interne_1gad06f93d41064705e7f6fd992fef1230f)`(void)` {#group__udc__group__interne_1gad06f93d41064705e7f6fd992fef1230f}
  134. Standard interface request to set an alternate setting of an interface.
  135. #### Returns
  136. true if success
  137. #### `public static bool `[`udc_reqstd`](#group__udc__group__interne_1gac82ad471b5bfa644309f98815757c867)`(void)` {#group__udc__group__interne_1gac82ad471b5bfa644309f98815757c867}
  138. Main routine to manage the standard USB SETUP request.
  139. #### Returns
  140. true if the request is supported
  141. #### `public static bool `[`udc_req_iface`](#group__udc__group__interne_1ga920a557a9121c44513deceb2f9358fc1)`(void)` {#group__udc__group__interne_1ga920a557a9121c44513deceb2f9358fc1}
  142. Send the SETUP interface request to UDI.
  143. #### Returns
  144. true if the request is supported
  145. #### `public static bool `[`udc_req_ep`](#group__udc__group__interne_1ga640a2df7bb1c1fbed895286a8513663c)`(void)` {#group__udc__group__interne_1ga640a2df7bb1c1fbed895286a8513663c}
  146. Send the SETUP interface request to UDI.
  147. #### Returns
  148. true if the request is supported
  149. #### `public bool `[`udc_process_setup`](#group__udc__group__interne_1ga58c2916d7984e0e5b2143cadf4af6080)`(void)` {#group__udc__group__interne_1ga58c2916d7984e0e5b2143cadf4af6080}
  150. Main routine to manage the USB SETUP request.
  151. Decodes and manages a setup request.
  152. 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.
  153. 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.
  154. #### Returns
  155. true if the request is supported, else the request is stalled by UDD
  156. # struct `udc_string_desc_t` {#structudc__string__desc__t}
  157. ## Summary
  158. Members | Descriptions
  159. --------------------------------|---------------------------------------------
  160. `public `[`usb_str_desc_t`](.build/docs/internals_usb_protocol_group.md#structusb__str__desc__t)` `[`header`](#structudc__string__desc__t_1ae96103b577725a05178dac3136d1a859) |
  161. `public le16_t `[`string`](#structudc__string__desc__t_1a9c4b5919e84bf0e87ea42a502f4dd74c) |
  162. ## Members
  163. #### `public `[`usb_str_desc_t`](.build/docs/internals_usb_protocol_group.md#structusb__str__desc__t)` `[`header`](#structudc__string__desc__t_1ae96103b577725a05178dac3136d1a859) {#structudc__string__desc__t_1ae96103b577725a05178dac3136d1a859}
  164. #### `public le16_t `[`string`](#structudc__string__desc__t_1a9c4b5919e84bf0e87ea42a502f4dd74c) {#structudc__string__desc__t_1a9c4b5919e84bf0e87ea42a502f4dd74c}