Skip to content

Commit

Permalink
Merge pull request #134 from aitap/ep_write_0_0_doc
Browse files Browse the repository at this point in the history
Document the usbd_ep_write(dev, ep, 0, 0) trick
  • Loading branch information
dmitrystu authored May 18, 2024
2 parents 343a474 + 8aa2ab8 commit eeef6f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/usbd_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ typedef int32_t (*usbd_hw_ep_read)(uint8_t ep, void *buf, uint16_t blen);
* \param buf pointer to data buffer
* \param blen size of data will be written
* \return number of written bytes
*
* The \ref usbd_evt_eptx event will fire for the endpoint once the
* write is \e complete. A trick commonly used is to enqueue a zero-length
* write as soon as the endpoint is configured, so that it would
* "complete", firing an event, the next time an IN request arrives.
*/
typedef int32_t (*usbd_hw_ep_write)(uint8_t ep, const void *buf, uint16_t blen);

Expand Down

0 comments on commit eeef6f7

Please sign in to comment.