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.

325 lines
25 KiB

  1. # group `usb_device_udd_group` {#group__usb__device__udd__group}
  2. USB low-level driver for USB device mode
  3. ## Summary
  4. Members | Descriptions
  5. --------------------------------|---------------------------------------------
  6. `define `[`UDC_REMOTEWAKEUP_LPM_ENABLE`](#group__usb__device__udd__group_1gaad02b98c5c4188ff50fd72c81e6bfa20) |
  7. `define `[`UDC_REMOTEWAKEUP_LPM_DISABLE`](#group__usb__device__udd__group_1gabd679a48d3828303b04b4e56b5e92481) |
  8. `define `[`UDC_SUSPEND_LPM_EVENT`](#group__usb__device__udd__group_1gaad464bdb9c5a422a2f337b6367114db6) |
  9. `define `[`dbg_print`](#group__usb__device__udd__group_1gac0876bf5bac7dfffd0ee0b003cdc76ef) |
  10. `define `[`UDD_ENDPOINT_MAX_TRANS`](#group__usb__device__udd__group_1ga9b73a2cd4488b39038d49d865e03fe0e) | Maximum size of a transfer in multi-packet mode
  11. `public static udd_ep_job_t * `[`udd_ep_get_job`](#group__usb__device__udd__group_1ga44d7180f54df872da50d8d04918fc5c7)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Get the detailed job by endpoint number.
  12. `public static void `[`udd_ep_trans_in_next`](#group__usb__device__udd__group_1ga7cd1ac3f0e6071afa036e27c5bd4d33c)`(void * pointer)` | Endpoint IN process, continue to send packets or zero length packet.
  13. `public static void `[`udd_ep_trans_out_next`](#group__usb__device__udd__group_1ga2c2140346e2f4ef3b07e36d2abf2de5e)`(void * pointer)` | Endpoint OUT process, continue to receive packets or zero length packet.
  14. `public static void `[`udd_ep_transfer_process`](#group__usb__device__udd__group_1gaa3607835799fb01db3d38bcbc87463fb)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` | Endpoint Transfer Complete callback function, to do the next transfer depends on the direction(IN or OUT)
  15. `public void `[`udd_ep_abort`](#group__usb__device__udd__group_1gaacd4ece19accac669506b615916efe2f)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Aborts transfer on going on endpoint.
  16. `public bool `[`udd_is_high_speed`](#group__usb__device__udd__group_1ga85f403ddb78776b1ba014dafd3ffec2c)`(void)` | Test whether the USB Device Controller is running at high speed or not.
  17. `public uint16_t `[`udd_get_frame_number`](#group__usb__device__udd__group_1ga96dc248cc05e07ffe2cf21e4d7465320)`(void)` | Returns the current start of frame number.
  18. `public uint16_t `[`udd_get_micro_frame_number`](#group__usb__device__udd__group_1ga63047eec59b8e8798ca1d3366472d82b)`(void)` | Returns the current micro start of frame number.
  19. `public void `[`udd_ep_free`](#group__usb__device__udd__group_1ga12c064720e08b9151e2a47f79d986c29)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Disables an endpoint.
  20. `public bool `[`udd_ep_alloc`](#group__usb__device__udd__group_1gaf87db391732b278915079b43ce20a4c1)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,uint8_t bmAttributes,uint16_t MaxEndpointSize)` | Configures and enables an endpoint.
  21. `public bool `[`udd_ep_is_halted`](#group__usb__device__udd__group_1ga2d531ac8c1e142185c6ed6eaeb2737c0)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Check if the endpoint *ep* is halted.
  22. `public bool `[`udd_ep_set_halt`](#group__usb__device__udd__group_1ga55dd14b9b00781223e39c2549ffdb61c)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Set the halted state of the endpoint *ep*.
  23. `public bool `[`udd_ep_clear_halt`](#group__usb__device__udd__group_1ga2b89e75674bd590432e9928326d5ef73)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` | Clear the halted state of the endpoint *ep*.
  24. `public bool `[`udd_ep_wait_stall_clear`](#group__usb__device__udd__group_1ga9dde9a9ac41ffc519cc2e2f93308db1c)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,`[`udd_callback_halt_cleared_t`](.build/docs/internals_undefined.md#group__udd__group_1ga70b1655bda30b7d03df637a1bb23bdd5)` callback)` | Registers a callback to call when endpoint halt is cleared.
  25. `public static void `[`udd_ctrl_stall_data`](#group__usb__device__udd__group_1gabf919b71cee71a11e1ea4e64fb9891d1)`(void)` | Control Endpoint stall sending data.
  26. `public bool `[`udd_ep_run`](#group__usb__device__udd__group_1ga3023b640115dd86dc922fcd79f5b8757)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,bool b_shortpacket,uint8_t * buf,iram_size_t buf_size,`[`udd_callback_trans_t`](.build/docs/internals_undefined.md#group__udd__group_1ga4e79edfc4d62b203dbc271e80a624917)` callback)` | Allows to receive or send data on an endpoint.
  27. `public void `[`udd_set_address`](#group__usb__device__udd__group_1ga05da762e0faf9d478e532de40afa71f6)`(uint8_t address)` | Changes the USB address of device.
  28. `public uint8_t `[`udd_getaddress`](#group__usb__device__udd__group_1gaebd36638d482f6df00a8aff006ef2246)`(void)` | Returns the USB address of device.
  29. `public void `[`udd_send_remotewakeup`](#group__usb__device__udd__group_1gac447212e04789282dabee65a23fe2a08)`(void)` | The USB driver sends a resume signal called Upstream Resume.
  30. `public void `[`udd_set_setup_payload`](#group__usb__device__udd__group_1ga017ef5ea7626be258c24d345218976f9)`(uint8_t * payload,uint16_t payload_size)` | Load setup payload.
  31. `public static void `[`udd_ctrl_fetch_ram`](#group__usb__device__udd__group_1gaf6ffb95ec28493ddaf038642ee995ce6)`(void)` | Control Endpoint translate the data in buffer into Device Request Struct.
  32. `public static void `[`udd_ctrl_send_zlp_in`](#group__usb__device__udd__group_1gab6a8abd5db8a94d6becc73b2b70dc748)`(void)` | Control Endpoint send out zero length packet.
  33. `public static void `[`udd_ctrl_in_sent`](#group__usb__device__udd__group_1ga181ffd0cddf5130f55df6df8ca3f916c)`(void)` | Process control endpoint IN transaction.
  34. `public static void `[`udd_ctrl_out_received`](#group__usb__device__udd__group_1gaa137563d9a7717c634279ad596fbc5fb)`(void * pointer)` | Process control endpoint OUT transaction.
  35. `public static void `[`_usb_ep0_on_setup`](#group__usb__device__udd__group_1ga2f36d2d5628b8edfaf619bcb2c7de44f)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  36. `public static void `[`udd_ctrl_underflow`](#group__usb__device__udd__group_1gae49bae7d7d68329b1c050f39c902d08e)`(void * pointer)` | Control Endpoint Process when underflow condition has occurred.
  37. `public static void `[`udd_ctrl_overflow`](#group__usb__device__udd__group_1ga58ec0c5b490824774f753cc9ff6c1250)`(void * pointer)` | Control Endpoint Process when overflow condition has occurred.
  38. `public static void `[`_usb_ep0_on_tansfer_fail`](#group__usb__device__udd__group_1ga67ec9c51a13358e3e241b2d10b3b4a05)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  39. `public static void `[`_usb_ep0_on_tansfer_ok`](#group__usb__device__udd__group_1gabe51608c4f3fb3cb905463758645127c)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  40. `public static void `[`udd_ctrl_ep_enable`](#group__usb__device__udd__group_1ga16a526f9870d3b670345b98bcfbe166c)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst)` | Enable Control Endpoint.
  41. `public static void `[`_usb_on_suspend`](#group__usb__device__udd__group_1gaf4c2f4bf0f76bcf873d165f1e960c8e1)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  42. `public static void `[`_usb_on_sof_notify`](#group__usb__device__udd__group_1gae65a2792570d8aec7e758b3526721086)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  43. `public static void `[`_usb_on_bus_reset`](#group__usb__device__udd__group_1gaf286144a1b50b68ed2edd38d67e1f4b0)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  44. `public static void `[`_usb_on_wakeup`](#group__usb__device__udd__group_1ga563d04cd60d478a430261aaa9da5e07a)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` |
  45. `public void `[`udd_detach`](#group__usb__device__udd__group_1ga03e59eaa264f1dbe5a52559311d0520e)`(void)` | Detaches the device from the bus.
  46. `public void `[`udd_attach`](#group__usb__device__udd__group_1ga7a7c0d9236c922c2af33c6702565a99f)`(void)` | Attach device to the bus when possible.
  47. `public void `[`udd_enable`](#group__usb__device__udd__group_1ga9792d1899ae058e3984d6a622fe2ad42)`(void)` | Enables the USB Device mode.
  48. `public void `[`udd_disable`](#group__usb__device__udd__group_1gab283432057b934e9d73ac9282d9b0f11)`(void)` | Disables the USB Device mode.
  49. ## Members
  50. #### `define `[`UDC_REMOTEWAKEUP_LPM_ENABLE`](#group__usb__device__udd__group_1gaad02b98c5c4188ff50fd72c81e6bfa20) {#group__usb__device__udd__group_1gaad02b98c5c4188ff50fd72c81e6bfa20}
  51. #### `define `[`UDC_REMOTEWAKEUP_LPM_DISABLE`](#group__usb__device__udd__group_1gabd679a48d3828303b04b4e56b5e92481) {#group__usb__device__udd__group_1gabd679a48d3828303b04b4e56b5e92481}
  52. #### `define `[`UDC_SUSPEND_LPM_EVENT`](#group__usb__device__udd__group_1gaad464bdb9c5a422a2f337b6367114db6) {#group__usb__device__udd__group_1gaad464bdb9c5a422a2f337b6367114db6}
  53. #### `define `[`dbg_print`](#group__usb__device__udd__group_1gac0876bf5bac7dfffd0ee0b003cdc76ef) {#group__usb__device__udd__group_1gac0876bf5bac7dfffd0ee0b003cdc76ef}
  54. #### `define `[`UDD_ENDPOINT_MAX_TRANS`](#group__usb__device__udd__group_1ga9b73a2cd4488b39038d49d865e03fe0e) {#group__usb__device__udd__group_1ga9b73a2cd4488b39038d49d865e03fe0e}
  55. Maximum size of a transfer in multi-packet mode
  56. #### `public static udd_ep_job_t * `[`udd_ep_get_job`](#group__usb__device__udd__group_1ga44d7180f54df872da50d8d04918fc5c7)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1ga44d7180f54df872da50d8d04918fc5c7}
  57. Get the detailed job by endpoint number.
  58. #### Parameters
  59. * `ep` Endpoint Address
  60. #### Parameters
  61. * `pointer` to an udd_ep_job_t structure instance
  62. #### `public static void `[`udd_ep_trans_in_next`](#group__usb__device__udd__group_1ga7cd1ac3f0e6071afa036e27c5bd4d33c)`(void * pointer)` {#group__usb__device__udd__group_1ga7cd1ac3f0e6071afa036e27c5bd4d33c}
  63. Endpoint IN process, continue to send packets or zero length packet.
  64. #### Parameters
  65. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  66. #### `public static void `[`udd_ep_trans_out_next`](#group__usb__device__udd__group_1ga2c2140346e2f4ef3b07e36d2abf2de5e)`(void * pointer)` {#group__usb__device__udd__group_1ga2c2140346e2f4ef3b07e36d2abf2de5e}
  67. Endpoint OUT process, continue to receive packets or zero length packet.
  68. #### Parameters
  69. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  70. #### `public static void `[`udd_ep_transfer_process`](#group__usb__device__udd__group_1gaa3607835799fb01db3d38bcbc87463fb)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1gaa3607835799fb01db3d38bcbc87463fb}
  71. Endpoint Transfer Complete callback function, to do the next transfer depends on the direction(IN or OUT)
  72. #### Parameters
  73. * `module_inst` Pointer to USB module instance
  74. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  75. #### `public void `[`udd_ep_abort`](#group__usb__device__udd__group_1gaacd4ece19accac669506b615916efe2f)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1gaacd4ece19accac669506b615916efe2f}
  76. Aborts transfer on going on endpoint.
  77. If a transfer is on going, then it is stopped and the callback registered is called to signal the end of transfer. Note: The control endpoint is not authorized.
  78. #### Parameters
  79. * `ep` Endpoint to abort
  80. #### `public bool `[`udd_is_high_speed`](#group__usb__device__udd__group_1ga85f403ddb78776b1ba014dafd3ffec2c)`(void)` {#group__usb__device__udd__group_1ga85f403ddb78776b1ba014dafd3ffec2c}
  81. Test whether the USB Device Controller is running at high speed or not.
  82. #### Returns
  83. `true` if the Device is running at high speed mode, otherwise `false`.
  84. #### `public uint16_t `[`udd_get_frame_number`](#group__usb__device__udd__group_1ga96dc248cc05e07ffe2cf21e4d7465320)`(void)` {#group__usb__device__udd__group_1ga96dc248cc05e07ffe2cf21e4d7465320}
  85. Returns the current start of frame number.
  86. #### Returns
  87. current start of frame number.
  88. #### `public uint16_t `[`udd_get_micro_frame_number`](#group__usb__device__udd__group_1ga63047eec59b8e8798ca1d3366472d82b)`(void)` {#group__usb__device__udd__group_1ga63047eec59b8e8798ca1d3366472d82b}
  89. Returns the current micro start of frame number.
  90. #### Returns
  91. current micro start of frame number required in high speed mode.
  92. #### `public void `[`udd_ep_free`](#group__usb__device__udd__group_1ga12c064720e08b9151e2a47f79d986c29)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1ga12c064720e08b9151e2a47f79d986c29}
  93. Disables an endpoint.
  94. #### Parameters
  95. * `ep` Endpoint number including direction (USB_EP_DIR_IN/USB_EP_DIR_OUT).
  96. #### `public bool `[`udd_ep_alloc`](#group__usb__device__udd__group_1gaf87db391732b278915079b43ce20a4c1)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,uint8_t bmAttributes,uint16_t MaxEndpointSize)` {#group__usb__device__udd__group_1gaf87db391732b278915079b43ce20a4c1}
  97. Configures and enables an endpoint.
  98. #### Parameters
  99. * `ep` Endpoint number including direction (USB_EP_DIR_IN/USB_EP_DIR_OUT).
  100. * `bmAttributes` Attributes of endpoint declared in the descriptor.
  101. * `MaxEndpointSize` Endpoint maximum size
  102. #### Returns
  103. `1` if the endpoint is enabled, otherwise `0`.
  104. #### `public bool `[`udd_ep_is_halted`](#group__usb__device__udd__group_1ga2d531ac8c1e142185c6ed6eaeb2737c0)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1ga2d531ac8c1e142185c6ed6eaeb2737c0}
  105. Check if the endpoint *ep* is halted.
  106. #### Parameters
  107. * `ep` The ID of the endpoint to check.
  108. #### Returns
  109. `1` if *ep* is halted, otherwise `0`.
  110. #### `public bool `[`udd_ep_set_halt`](#group__usb__device__udd__group_1ga55dd14b9b00781223e39c2549ffdb61c)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1ga55dd14b9b00781223e39c2549ffdb61c}
  111. Set the halted state of the endpoint *ep*.
  112. After calling this function, any transaction on *ep* will result in a STALL handshake being sent. Any pending transactions will be performed first, however.
  113. #### Parameters
  114. * `ep` The ID of the endpoint to be halted
  115. #### Returns
  116. `1` if *ep* is halted, otherwise `0`.
  117. #### `public bool `[`udd_ep_clear_halt`](#group__usb__device__udd__group_1ga2b89e75674bd590432e9928326d5ef73)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep)` {#group__usb__device__udd__group_1ga2b89e75674bd590432e9928326d5ef73}
  118. Clear the halted state of the endpoint *ep*.
  119. After calling this function, any transaction on *ep* will be handled normally, i.e. a STALL handshake will not be sent, and the data toggle sequence will start at DATA0.
  120. #### Parameters
  121. * `ep` The ID of the endpoint to be un-halted
  122. #### Returns
  123. `1` if function was successfully done, otherwise `0`.
  124. #### `public bool `[`udd_ep_wait_stall_clear`](#group__usb__device__udd__group_1ga9dde9a9ac41ffc519cc2e2f93308db1c)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,`[`udd_callback_halt_cleared_t`](.build/docs/internals_undefined.md#group__udd__group_1ga70b1655bda30b7d03df637a1bb23bdd5)` callback)` {#group__usb__device__udd__group_1ga9dde9a9ac41ffc519cc2e2f93308db1c}
  125. Registers a callback to call when endpoint halt is cleared.
  126. #### Parameters
  127. * `ep` The ID of the endpoint to use
  128. * `callback` NULL or function to call when endpoint halt is cleared
  129. if the endpoint is not halted then the *callback* is called immediately.
  130. #### Returns
  131. `1` if the register is accepted, otherwise `0`.
  132. #### `public static void `[`udd_ctrl_stall_data`](#group__usb__device__udd__group_1gabf919b71cee71a11e1ea4e64fb9891d1)`(void)` {#group__usb__device__udd__group_1gabf919b71cee71a11e1ea4e64fb9891d1}
  133. Control Endpoint stall sending data.
  134. #### `public bool `[`udd_ep_run`](#group__usb__device__udd__group_1ga3023b640115dd86dc922fcd79f5b8757)`(`[`udd_ep_id_t`](.build/docs/internals_undefined.md#group__udd__group_1ga6f25ea016c07bd48c3074f51d8ef8b01)` ep,bool b_shortpacket,uint8_t * buf,iram_size_t buf_size,`[`udd_callback_trans_t`](.build/docs/internals_undefined.md#group__udd__group_1ga4e79edfc4d62b203dbc271e80a624917)` callback)` {#group__usb__device__udd__group_1ga3023b640115dd86dc922fcd79f5b8757}
  135. Allows to receive or send data on an endpoint.
  136. The driver uses a specific DMA USB to transfer data from internal RAM to endpoint, if this one is available. When the transfer is finished or aborted (stall, reset, ...), the *callback* is called. The *callback* returns the transfer status and eventually the number of byte transfered. Note: The control endpoint is not authorized.
  137. #### Parameters
  138. * `ep` The ID of the endpoint to use
  139. * `b_shortpacket` Enabled automatic short packet
  140. * `buf` Buffer on Internal RAM to send or fill. It must be align, then use COMPILER_WORD_ALIGNED.
  141. * `buf_size` Buffer size to send or fill
  142. * `callback` NULL or function to call at the end of transfer
  143. About *b_shortpacket*, for IN endpoint it means that a short packet (or a Zero Length Packet) will be sent to the USB line to properly close the usb transfer at the end of the data transfer. For Bulk and Interrupt OUT endpoint, it will automatically stop the transfer at the end of the data transfer (received short packet).
  144. #### Returns
  145. `1` if function was successfully done, otherwise `0`.
  146. #### `public void `[`udd_set_address`](#group__usb__device__udd__group_1ga05da762e0faf9d478e532de40afa71f6)`(uint8_t address)` {#group__usb__device__udd__group_1ga05da762e0faf9d478e532de40afa71f6}
  147. Changes the USB address of device.
  148. #### Parameters
  149. * `address` New USB address
  150. #### `public uint8_t `[`udd_getaddress`](#group__usb__device__udd__group_1gaebd36638d482f6df00a8aff006ef2246)`(void)` {#group__usb__device__udd__group_1gaebd36638d482f6df00a8aff006ef2246}
  151. Returns the USB address of device.
  152. #### Returns
  153. USB address
  154. #### `public void `[`udd_send_remotewakeup`](#group__usb__device__udd__group_1gac447212e04789282dabee65a23fe2a08)`(void)` {#group__usb__device__udd__group_1gac447212e04789282dabee65a23fe2a08}
  155. The USB driver sends a resume signal called Upstream Resume.
  156. #### `public void `[`udd_set_setup_payload`](#group__usb__device__udd__group_1ga017ef5ea7626be258c24d345218976f9)`(uint8_t * payload,uint16_t payload_size)` {#group__usb__device__udd__group_1ga017ef5ea7626be258c24d345218976f9}
  157. Load setup payload.
  158. #### Parameters
  159. * `payload` Pointer on payload
  160. * `payload_size` Size of payload
  161. #### `public static void `[`udd_ctrl_fetch_ram`](#group__usb__device__udd__group_1gaf6ffb95ec28493ddaf038642ee995ce6)`(void)` {#group__usb__device__udd__group_1gaf6ffb95ec28493ddaf038642ee995ce6}
  162. Control Endpoint translate the data in buffer into Device Request Struct.
  163. #### `public static void `[`udd_ctrl_send_zlp_in`](#group__usb__device__udd__group_1gab6a8abd5db8a94d6becc73b2b70dc748)`(void)` {#group__usb__device__udd__group_1gab6a8abd5db8a94d6becc73b2b70dc748}
  164. Control Endpoint send out zero length packet.
  165. #### `public static void `[`udd_ctrl_in_sent`](#group__usb__device__udd__group_1ga181ffd0cddf5130f55df6df8ca3f916c)`(void)` {#group__usb__device__udd__group_1ga181ffd0cddf5130f55df6df8ca3f916c}
  166. Process control endpoint IN transaction.
  167. #### `public static void `[`udd_ctrl_out_received`](#group__usb__device__udd__group_1gaa137563d9a7717c634279ad596fbc5fb)`(void * pointer)` {#group__usb__device__udd__group_1gaa137563d9a7717c634279ad596fbc5fb}
  168. Process control endpoint OUT transaction.
  169. #### Parameters
  170. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  171. #### `public static void `[`_usb_ep0_on_setup`](#group__usb__device__udd__group_1ga2f36d2d5628b8edfaf619bcb2c7de44f)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1ga2f36d2d5628b8edfaf619bcb2c7de44f}
  172. #### `public static void `[`udd_ctrl_underflow`](#group__usb__device__udd__group_1gae49bae7d7d68329b1c050f39c902d08e)`(void * pointer)` {#group__usb__device__udd__group_1gae49bae7d7d68329b1c050f39c902d08e}
  173. Control Endpoint Process when underflow condition has occurred.
  174. #### Parameters
  175. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  176. #### `public static void `[`udd_ctrl_overflow`](#group__usb__device__udd__group_1ga58ec0c5b490824774f753cc9ff6c1250)`(void * pointer)` {#group__usb__device__udd__group_1ga58ec0c5b490824774f753cc9ff6c1250}
  177. Control Endpoint Process when overflow condition has occurred.
  178. #### Parameters
  179. * `pointer` Pointer to the endpoint transfer status parameter struct from driver layer.
  180. #### `public static void `[`_usb_ep0_on_tansfer_fail`](#group__usb__device__udd__group_1ga67ec9c51a13358e3e241b2d10b3b4a05)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1ga67ec9c51a13358e3e241b2d10b3b4a05}
  181. #### `public static void `[`_usb_ep0_on_tansfer_ok`](#group__usb__device__udd__group_1gabe51608c4f3fb3cb905463758645127c)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1gabe51608c4f3fb3cb905463758645127c}
  182. #### `public static void `[`udd_ctrl_ep_enable`](#group__usb__device__udd__group_1ga16a526f9870d3b670345b98bcfbe166c)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst)` {#group__usb__device__udd__group_1ga16a526f9870d3b670345b98bcfbe166c}
  183. Enable Control Endpoint.
  184. #### Parameters
  185. * `module_inst` Pointer to USB module instance
  186. #### `public static void `[`_usb_on_suspend`](#group__usb__device__udd__group_1gaf4c2f4bf0f76bcf873d165f1e960c8e1)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1gaf4c2f4bf0f76bcf873d165f1e960c8e1}
  187. #### `public static void `[`_usb_on_sof_notify`](#group__usb__device__udd__group_1gae65a2792570d8aec7e758b3526721086)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1gae65a2792570d8aec7e758b3526721086}
  188. #### `public static void `[`_usb_on_bus_reset`](#group__usb__device__udd__group_1gaf286144a1b50b68ed2edd38d67e1f4b0)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1gaf286144a1b50b68ed2edd38d67e1f4b0}
  189. #### `public static void `[`_usb_on_wakeup`](#group__usb__device__udd__group_1ga563d04cd60d478a430261aaa9da5e07a)`(struct `[`usb_module`](.build/docs/internals_undefined.md#structusb__module)` * module_inst,void * pointer)` {#group__usb__device__udd__group_1ga563d04cd60d478a430261aaa9da5e07a}
  190. #### `public void `[`udd_detach`](#group__usb__device__udd__group_1ga03e59eaa264f1dbe5a52559311d0520e)`(void)` {#group__usb__device__udd__group_1ga03e59eaa264f1dbe5a52559311d0520e}
  191. Detaches the device from the bus.
  192. The driver must remove pull-up on USB line D- or D+.
  193. #### `public void `[`udd_attach`](#group__usb__device__udd__group_1ga7a7c0d9236c922c2af33c6702565a99f)`(void)` {#group__usb__device__udd__group_1ga7a7c0d9236c922c2af33c6702565a99f}
  194. Attach device to the bus when possible.
  195. If a VBus control is included in driver, then it will attach device when an acceptable Vbus level from the host is detected.
  196. #### `public void `[`udd_enable`](#group__usb__device__udd__group_1ga9792d1899ae058e3984d6a622fe2ad42)`(void)` {#group__usb__device__udd__group_1ga9792d1899ae058e3984d6a622fe2ad42}
  197. Enables the USB Device mode.
  198. #### `public void `[`udd_disable`](#group__usb__device__udd__group_1gab283432057b934e9d73ac9282d9b0f11)`(void)` {#group__usb__device__udd__group_1gab283432057b934e9d73ac9282d9b0f11}
  199. Disables the USB Device mode.