diff options
Diffstat (limited to 'docs/contributing')
| l--------- | docs/contributing/code_of_conduct.rst | 2 | ||||
| -rw-r--r-- | docs/contributing/index.rst | 3 | ||||
| -rw-r--r-- | docs/contributing/porting.rst | 8 | ||||
| -rw-r--r-- | docs/contributing/structure.rst | 59 |
4 files changed, 6 insertions, 66 deletions
diff --git a/docs/contributing/code_of_conduct.rst b/docs/contributing/code_of_conduct.rst index b52bf14c5..fb1859c75 120000 --- a/docs/contributing/code_of_conduct.rst +++ b/docs/contributing/code_of_conduct.rst @@ -1 +1 @@ -../../CODE_OF_CONDUCT.rst
\ No newline at end of file +.. include:: ../../CODE_OF_CONDUCT.rst
\ No newline at end of file diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst index c572894ad..78933a3ca 100644 --- a/docs/contributing/index.rst +++ b/docs/contributing/index.rst @@ -6,7 +6,7 @@ Contributing can be highly rewarding, but it can also be frustrating at times. It takes time to review patches, and as this is an open source project, that sometimes can take a while. The reviewing process depends on the availability of the maintainers, who may not be always available. Please try to be -understanding throught the process. +understanding through the process. There a few guidelines you need to keep in mind when contributing. Please have a look at them as that will make the contribution process easier for all @@ -19,5 +19,4 @@ Index :maxdepth: 2 code_of_conduct - structure porting diff --git a/docs/contributing/porting.rst b/docs/contributing/porting.rst index 7e9e462f0..f81d98782 100644 --- a/docs/contributing/porting.rst +++ b/docs/contributing/porting.rst @@ -62,9 +62,9 @@ Feel free to skip this until you want to verify your demo code is running. To im OS Abstraction Layer (OSAL) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The OS Abstraction Layer is responsible for providing basic data structures for TinyUSB that may allow for concurrency when used with an RTOS. Without an RTOS it simply handles concurrency issues between the main code and interrupts. +The OS Abstraction Layer is responsible for providing basic data structures for TinyUSB that may allow for concurrency when used with an RTOS. Without an RTOS it simply handles concurrency issues between the main code and interrupts. The code is almost entirely agnostic of MCU and lives in ``src/osal``. -The code is almost entirely agnostic of MCU and lives in ``src/osal``. +In RTOS configurations, tud_task()/tuh_task() blocks behind a synchronization structure when the event queue is empty, so that the scheduler may give the CPU to a different task. To take advantage of the library's capability to yield the CPU when there are no actionable USB device events, ensure that the `CFG_TUSB_OS` symbol is defined, e.g `OPT_OS_FREERTOS` enables the FreeRTOS scheduler to schedule other threads than that which calls `tud_task()/tuh_task()`. Device API ^^^^^^^^^^ @@ -195,7 +195,7 @@ Others (like the nRF52) may need each USB packet queued individually. To make th some state for yourself and queue up an intermediate USB packet from the interrupt handler. Once the transaction is going, the interrupt handler will notify TinyUSB of transfer completion. -During transmission, the IN data buffer is guarenteed to remain unchanged in memory until the ``dcd_xfer_complete`` function is called. +During transmission, the IN data buffer is guaranteed to remain unchanged in memory until the ``dcd_xfer_complete`` function is called. The dcd_edpt_xfer function must never add zero-length-packets (ZLP) on its own to a transfer. If a ZLP is required, then it must be explicitly sent by the stack calling dcd_edpt_xfer(), by calling dcd_edpt_xfer() a second time with len=0. @@ -238,4 +238,4 @@ Use `WireShark <https://www.wireshark.org/>`_ or `a Beagle <https://www.totalpha * If the host sends a SETUP packet and its not ACKed then your USB peripheral probably isn't started correctly. * If the peripheral is started correctly but it still didn't work, then verify your usb clock is correct. (You did output a PWM based on it right? ;-) ) -* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example ``tud_task`` may not be called.) If thats OK, the ``dcd_xfer_complete`` may not be setting up the next transaction correctly. +* If the SETUP packet is ACKed but nothing is sent back then you interrupt handler isn't queueing the setup packet correctly. (Also, if you are using your own code instead of an example ``tud_task`` may not be called.) If that's OK, the ``dcd_xfer_complete`` may not be setting up the next transaction correctly. diff --git a/docs/contributing/structure.rst b/docs/contributing/structure.rst deleted file mode 100644 index e8c658850..000000000 --- a/docs/contributing/structure.rst +++ /dev/null @@ -1,59 +0,0 @@ -********* -Structure -********* - -Tree -==== - -:: - - . - ├── docs - ├── examples - ├── hw - │ ├── bsp - │ └── mcu - ├── lib - ├── src - ├── test - └── tools - -docs ----- - -Documentation - -examples --------- - -Sample with Makefile build support - -hw/bsp ------- - -Supported boards source files - -hw/mcu ------- - -Low level mcu core & peripheral drivers - -lib ---- - -Sources from 3rd party such as freeRTOS, fatfs ... - -src ---- - -All sources files for TinyUSB stack itself. - -test ----- - -Unit tests for the stack - -tools ------ - -Files used internally |
