summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-17 13:38:22 +0700
committerhathach <[email protected]>2020-04-17 13:38:22 +0700
commit05476d9ad72321aa6e57ff5acbc4b25e1366fead (patch)
tree10a12e71a679243ad5775ed7e0088242b8e763c8 /docs
parentf4df82939955d86f6c2e826e1bc9f4b5bb713df8 (diff)
parent85f0894fff89baaaa91a6dc3554a3149fc2fc062 (diff)
Merge branch 'master' into remove-dcd-set-config
Diffstat (limited to 'docs')
-rw-r--r--docs/porting.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/porting.md b/docs/porting.md
index f80245014..fabf24510 100644
--- a/docs/porting.md
+++ b/docs/porting.md
@@ -68,7 +68,7 @@ This function should leave an internal D+/D- pull-up in its default power-on sta
Enables or disables the USB device interrupt(s). May be used to prevent concurrency issues when mutating data structures shared between main code and the interrupt handler.
-##### dcd_irq_handler
+##### dcd_int_handler
Processes all the hardware generated events e.g Bus reset, new data packet from host etc ... It will be called by application in the MCU USB interrupt handler.
@@ -134,6 +134,14 @@ Opening an endpoint is done for all non-control endpoints once the host picks a
Also make sure to enable endpoint specific interrupts.
+##### dcd_edpt_close
+
+Close an endpoint. his function is used for implementing alternate settings.
+
+After calling this, the device should not respond to any packets directed towards this endpoint. When called, this function must abort any transfers in progress through this endpoint, before returning.
+
+Implementation is optional. Must be called from the USB task. Interrupts could be disabled or enabled during the call.
+
##### dcd_edpt_xfer
`dcd_edpt_xfer` is responsible for configuring the peripheral to send or receive data from the host. "xfer" is short for "transfer". **This is one of the core methods you must implement for TinyUSB to work (one other is the interrupt handler).** Data from the host is the OUT direction and data to the host is IN. It is used for all endpoints including the control endpoint 0. Make sure to handle the zero-length packet STATUS packet on endpoint 0 correctly. It may be a special transaction to the peripheral.