4 Commits 343a474068 ... e3ca5e636e

Auteur SHA1 Bericht Datum
  Dmitry Filimonchuk e3ca5e636e Merge pull request #132 from JarvisCraft/fix-include-guard 2 jaren geleden
  Dmitry Filimonchuk eeef6f7194 Merge pull request #134 from aitap/ep_write_0_0_doc 2 jaren geleden
  Ivan K 8aa2ab8d97 Document the usbd_ep_write(dev, ep, 0, 0) trick 2 jaren geleden
  Petr Portnov 89fd6ce5c7 fix(hid_usage_simulation.h): invalid include guard 2 jaren geleden
2 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 1 1
      inc/hid_usage_simulation.h
  2. 5 0
      inc/usbd_core.h

+ 1 - 1
inc/hid_usage_simulation.h

@@ -14,7 +14,7 @@
  */
 
 #ifndef _USB_HID_USAGE_SIMUL_H_
-#define _USB_HID_USAHE_SUMUL_H_
+#define _USB_HID_USAGE_SIMUL_H_
 #ifdef __cplusplus
     extern "C" {
 #endif

+ 5 - 0
inc/usbd_core.h

@@ -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);