diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..215b5fed --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,13 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +sphinx: + configuration: docs/conf.py + +python: + version: 3.8 + install: + - requirements: docs/requirements.txt diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 0da6ff68..00000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at thach@tinyusb.org. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst new file mode 100644 index 00000000..4035c528 --- /dev/null +++ b/CODE_OF_CONDUCT.rst @@ -0,0 +1,88 @@ +*************** +Code of Conduct +*************** + +Our Pledge +---------- + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our +project and our community a harassment-free experience for everyone, +regardless of age, body size, disability, ethnicity, sex +characteristics, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +Our Standards +------------- + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual + attention or advances +- Trolling, insulting/derogatory comments, and personal or political + attacks +- Public or private harassment +- Publishing others' private information, such as a physical or + electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +Our Responsibilities +-------------------- + +Project maintainers are responsible for clarifying the standards of +acceptable behavior and are expected to take appropriate and fair +corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, +or reject comments, commits, code, wiki edits, issues, and other +contributions that are not aligned to this Code of Conduct, or to ban +temporarily or permanently any contributor for other behaviors that they +deem inappropriate, threatening, offensive, or harmful. + +Scope +----- + +This Code of Conduct applies both within project spaces and in public +spaces when an individual is representing the project or its community. +Examples of representing a project or community include using an +official project e-mail address, posting via an official social media +account, or acting as an appointed representative at an online or +offline event. Representation of a project may be further defined and +clarified by project maintainers. + +Enforcement +----------- + +Instances of abusive, harassing, or otherwise unacceptable behavior may +be reported by contacting the project team at thach@tinyusb.org. All +complaints will be reviewed and investigated and will result in a +response that is deemed necessary and appropriate to the circumstances. +The project team is obligated to maintain confidentiality with regard to +the reporter of an incident. Further details of specific enforcement +policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in +good faith may face temporary or permanent repercussions as determined +by other members of the project's leadership. + +Attribution +----------- + +This Code of Conduct is adapted from the `Contributor +Covenant `__, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md deleted file mode 100644 index 5fa3e525..00000000 --- a/CONTRIBUTORS.md +++ /dev/null @@ -1,97 +0,0 @@ -# TinyUSB contributors (sorted alphabetically) - -- **[Adafruit Team](https://github.com/adafruit)** - - Main supporter and sponsor for hardware boards and kits - - Discussion and suggestion for feature and improvement - - Design the project logo - -- **[Ha Thach](https://github.com/hathach)** - - *Author and maintainer* - - Most features development - -- **[Hristo Gochkov](https://github.com/me-no-dev)** - - Improve ESP32s2 DCD - -- **[Jan Dümpelmann](https://github.com/duempel)** - - Improve transfer performance for Synopsys DCD for STM32 MCUs - -- **[Jeff Epler](https://github.com/jepler)** - - Improve MIDI class driver - -- **[Jerzy Kasenberg](https://github.com/kasjer)** - - Add new DCD port for **Dialog DA1469x** - - Add new class driver for **Bluetooth HCI** - - Add ISO transfer for STM32 Synopsys, Nordic nRF, Dialog DA1469x - - Improve Audio driver and add uac2_headset example - - Improve STM32 Synopsys DCD with various PRs - -- **[J McCarthy](https://github.com/xmos-jmccarthy)** - - Add new DFU 1.1 class driver - - Add new example for dfu - -- **[Kamil Tomaszewski](https://github.com/kamtom480)** - - Add new DCD port for **Sony CXD56** (spresnese board) - -- **[Kay Sievers](https://github.com/kaysievers)** - - Improve MIDI driver with packet API - -- **[Koji KITAYAMA](https://github.com/kkitayam)** - - Add new DCD port for **NXP Kinetis KL25** - - Add new DCD port for **Renesas RX63n** with GR-CITRUS board - -- **[Nathan Conrad](https://github.com/pigrew)** - - Add new DCD port for **STM32 fsdev** Fullspeed device for STM32 L0, F0, F1, F3 etc ... - - Add new class driver for **USB Test and Measurement Class (USBTMC)** - - Various improvement e.g Zero-length packet, Lint setup - - Board support for STM32F070RB Nucleo, STM32F303 Discovery - -- **[Peter Lawrence](https://github.com/majbthrd)** - - Add new DCD port for **Nuvoton NUC 120, 121, 125, 126, 505** - - Add new class driver for **USBNET RNDIS, CDC-ECM** - - Add *net_lwip_webserver* example for demonstration of usbnet with lwip - - Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505 - - Improve multiple cdc interfaces API & add cdc_dual_ports example - -- **[Rafael Silva](https://github.com/perigoso)** - - Add new DCD port for **Silabs EFM32GG12** with SLTB009A board - -- **[Raspberry Pi Team](https://github.com/raspberrypi)** - - Add new DCD port for **Raspberry Pi RP2040** - - Add new HCD port for **Raspberry Pi RP2040** - -- **[Reinhard Panhuber](https://github.com/PanRe)** - - Add new class driver for **USB Audio Class 2.0 (UAC2)** - - Rework tu_fifo with unmasked pointer, add DMA support, and constant address support - - Add new DCD/USBD edpt_xfer_fifo() API for optimizing endpoint transfer - - Add and greatly improve Isochronous transfer - - Add new audio examples: audio_test and audio_4_channel_mic - -- **[Scott Shawcroft](https://github.com/tannewt)** - - Add new DCD port for **SAMD21 and SAMD51** - - Add new class driver for **Musical Instrument Digital Interface (MIDI)** - - Improve USBD control transfer, MSC, CDC class driver - - Board support for Metro M0 & M4 express - - Write the excellent porting.md documentation - - Add initial Makefile - -- **[Sean Cross](https://github.com/xobs)** - - Add new DCD port for **ValentyUSB eptri** (fomu board) - -- **[Sylvain "tnt" Munaut](https://github.com/smunaut)** - - Add new class driver for DFU Runtime - -- **[Timon Skerutsch](https://github.com/PTS93)** - - Add hid_test.js script and extensive test for bi-directional raw HID - -- **[Tod E. Kurt](https://github.com/todbot)** - - Add hid_test.js script and extensive test for bi-directional raw HID - -- **[Uwe Bonnes](https://github.com/UweBonnes)** - - Improve STM32 Synopsys highspeed DCD - -- **[William D. Jones](https://github.com/cr1901)** - - Add new DCD port for **Synopsys DesignWare** for STM32 L4, F2, F4, F7, H7 etc ... - - Add new DCD port for **TI MSP430** - - Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard v1.1, msp_exp430f5529lp etc ... - -**[Full contributors list](https://github.com/hathach/tinyusb/contributors).** diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst new file mode 100644 index 00000000..040f4016 --- /dev/null +++ b/CONTRIBUTORS.rst @@ -0,0 +1,189 @@ +************ +Contributors +************ + +Special thanks to all the people who spent their precious time and effort to help this project so far. +list contributors and their awesome work for the stack: + +Notable contributors +==================== + +(sorted alphabetically) + +`Adafruit Team `__ +----------------------------------------------- + +- Main supporter and sponsor for hardware boards and kits +- Discussion and suggestion for feature and improvement +- Design the project logo + + +`Ha Thach `__ +----------------------------------------- + +- *Author and maintainer* +- Most features development + + +`Hristo Gochkov `__ +------------------------------------------------- + +- Improve ESP32s2 DCD + + +`Jan Dümpelmann `__ +----------------------------------------------- + +- Improve transfer performance for Synopsys DCD for STM32 MCUs + + +`Jeff Epler `__ +------------------------------------------ + +- Improve MIDI class driver + + +`Jerzy Kasenberg `__ +----------------------------------------------- + +- Add new DCD port for Dialog DA1469x +- Add new class driver for Bluetooth HCI +- Add ISO transfer for STM32 Synopsys, Nordic nRF, Dialog DA1469x +- Improve Audio driver and add uac2\_headset example +- Improve STM32 Synopsys DCD with various PRs + + +`J McCarthy `__ +-------------------------------------------------- + +- Add new DFU 1.1 class driver +- Add new example for dfu + + +`Kamil Tomaszewski `__ +---------------------------------------------------- + +- Add new DCD port for Sony CXD56 (spresnese board) + + +`Kay Sievers `__ +----------------------------------------------- + +- Improve MIDI driver with packet API + + +`Koji KITAYAMA `__ +----------------------------------------------- + +- Add new DCD port for NXP Kinetis KL25 +- Add new DCD port for Renesas RX63n with GR-CITRUS board + + +`Nathan Conrad `__ +--------------------------------------------- + +- Add new DCD port for STM32 fsdev Fullspeed device for STM32 L0, + F0, F1, F3 etc ... +- Add new class driver for USB Test and Measurement Class (USBTMC) +- Various improvement e.g Zero-length packet, Lint setup +- Board support for STM32F070RB Nucleo, STM32F303 Discovery + + +`Peter Lawrence `__ +------------------------------------------------ + +- Add new DCD port for Nuvoton NUC 120, 121, 125, 126, 505 +- Add new class driver for USBNET RNDIS, CDC-ECM +- Add *net\_lwip\_webserver* example for demonstration of usbnet with + lwip +- Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505 +- Improve multiple cdc interfaces API & add cdc\_dual\_ports example + + +`Rafael Silva `__ +---------------------------------------------- + +- Add new DCD port for Silabs EFM32GG12 with SLTB009A board +- Rewrite documentation in rst and setup for readthedocs + + +`Raspberry Pi Team `__ +------------------------------------------------------ + +- Add new DCD port for Raspberry Pi RP2040 +- Add new HCD port for Raspberry Pi RP2040 + + +`Reinhard Panhuber `__ +------------------------------------------------ + +- Add new class driver for USB Audio Class 2.0 (UAC2) +- Rework tu\_fifo with unmasked pointer, add DMA support, and constant + address support +- Add new DCD/USBD edpt\_xfer\_fifo() API for optimizing endpoint + transfer +- Add and greatly improve Isochronous transfer +- Add new audio examples: audio\_test and audio\_4\_channel\_mic + + +`Scott Shawcroft `__ +------------------------------------------------ + +- Add new DCD port for SAMD21 and SAMD51 +- Add new class driver for Musical Instrument Digital Interface + (MIDI) +- Improve USBD control transfer, MSC, CDC class driver +- Board support for Metro M0 & M4 express +- Write the excellent porting.md documentation +- Add initial Makefile + +`Sean Cross `__ +---------------------------------------- + +- Add new DCD port for ValentyUSB eptri (fomu board) + + +`Sylvain "tnt" Munaut `__ +----------------------------------------------------- + +- Add new class driver for DFU Runtime + + +`Timon Skerutsch `__ +---------------------------------------------- + +- Add hid\_test.js script and extensive test for bi-directional raw HID + + +`Tod E. Kurt `__ +------------------------------------------- + +- Add hid\_test.js script and extensive test for bi-directional raw HID + + +`Uwe Bonnes `__ +--------------------------------------------- + +- Improve STM32 Synopsys highspeed DCD + + +`William D. Jones `__ +------------------------------------------------ + +- Add new DCD port for Synopsys DesignWare for STM32 L4, F2, F4, + F7, H7 etc ... +- Add new DCD port for TI MSP430 +- Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard + v1.1, msp\_exp430f5529lp etc ... + + +`Zixun Li `__ +----------------------------------------------- + +- Add new DCD port for Microchip SAMx7x +- Add IAR compiler support +- Improve UAC2, CDC, DFU class driver + + +`Full contributors list `__ +============================================================================ diff --git a/README.md b/README.md deleted file mode 100644 index df0c05e6..00000000 --- a/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# TinyUSB - -![TinyUSB](https://user-images.githubusercontent.com/2847802/108847382-a0a6a580-75ad-11eb-96d9-280c79389281.png) - -[![Build Status](https://github.com/hathach/tinyusb/workflows/Build/badge.svg)](https://github.com/hathach/tinyusb/actions) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) - -TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function. - -![tinyusb](https://user-images.githubusercontent.com/249515/49858616-f60c9700-fe27-11e8-8627-e76936352ff7.png) - -``` -. -├── docs # Documentation -├── examples # Sample with Makefile build support -├── hw -│   ├── bsp # Supported boards source files -│   └── 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 -``` - -## Contributors - -Special thanks to all the people who spent their precious time and effort to help this project so far. Check out the -[CONTRIBUTORS.md](CONTRIBUTORS.md) file for the list of all contributors and their awesome work for the stack. - -## Supported MCUs - -The stack supports the following MCUs: - -- **Dialog:** DA1469x -- **Espressif:** ESP32-S2, ESP32-S3 -- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55, SAML21, SAML22, SAME7x -- **NordicSemi:** nRF52833, nRF52840 -- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505 -- **NXP:** - - iMX RT Series: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064 - - Kinetis: KL25 - - LPC Series: 11u, 13, 15, 17, 18, 40, 43, 51u, 54, 55 -- **Raspberry Pi:** RP2040 -- **Renesas:** RX63N, RX65N -- **Silabs:** EFM32GG12 -- **Sony:** CXD56 -- **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 both FullSpeed and HighSpeed -- **TI:** MSP430 -- **[ValentyUSB](https://github.com/im-tomu/valentyusb)** eptri - -[Here is the list of supported Boards](docs/boards.md) that can be used with provided examples. - -## Device Stack - -Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported: - -- Audio Class 2.0 (UAC2) -- Bluetooth Host Controller Interface (BTH HCI) -- Communication Class (CDC) -- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme -- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ... -- Mass Storage Class (MSC): with multiple LUNs -- Musical Instrument Digital Interface (MIDI) -- Network with RNDIS, CDC-ECM (work in progress) -- USB Test and Measurement Class (USBTMC) -- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file. -- [WebUSB](https://github.com/WICG/webusb) with vendor-specific class - -If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface [raspberrypi/pico-sdk#197](https://github.com/raspberrypi/pico-sdk/pull/197) - -## Host Stack - -**Most active development is on the Device stack. The Host stack is under rework and largely untested.** - -- Human Interface Device (HID): Keyboard, Mouse, Generic -- Mass Storage Class (MSC) -- Hub currently only supports 1 level of hub (due to my laziness) - -## OS Abstraction layer - -TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box. - -- **No OS** -- **FreeRTOS** -- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example) - -## Getting Started - -[Here are the details for getting started](docs/getting_started.md) with the stack. - -## Porting - -Want to help add TinyUSB support for a new MCU? Read [here](docs/porting.md) for an explanation on the low-level API needed by TinyUSB. - -## License - -MIT license for all TinyUSB sources `src` folder, [Full license is here](LICENSE). However, each file is individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project. - -## Uses - -TinyUSB is currently used by these other projects: - -- [Adafruit nRF52 Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino) -- [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader) -- [Adafruit SAMD Arduino](https://github.com/adafruit/ArduinoCore-samd) -- [CircuitPython](https://github.com/adafruit/circuitpython) -- [Espressif IDF](https://github.com/espressif/esp-idf) -- [MicroPython](https://github.com/micropython/micropython) -- [mynewt](https://mynewt.apache.org) -- [openinput](https://github.com/openinput-fw/openinput) -- [Raspberry Pi Pico SDK](https://github.com/raspberrypi/pico-sdk) -- [TinyUF2 Bootloader](https://github.com/adafruit/tinyuf2) -- [TinyUSB Arduino Library](https://github.com/adafruit/Adafruit_TinyUSB_Arduino) diff --git a/README.rst b/README.rst new file mode 100644 index 00000000..6de51535 --- /dev/null +++ b/README.rst @@ -0,0 +1,140 @@ +.. figure:: docs/assets/logo.svg + :alt: TinyUSB + +|Build Status| |Documentation Status| |License| + +TinyUSB is an open-source cross-platform USB Host/Device stack for +embedded system, designed to be memory-safe with no dynamic allocation +and thread-safe with all interrupt events are deferred then handled in +the non-ISR task function. + +Please take a look at the online `documentation `__. + +.. figure:: docs/assets/stack.svg + :width: 500px + :alt: stackup + +:: + + . + ├── docs # Documentation + ├── examples # Sample with Makefile build support + ├── hw + │   ├── bsp # Supported boards source files + │   └── 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 + +Supported MCUs +============== + +The stack supports the following MCUs: + +- **Dialog:** DA1469x +- **Espressif:** ESP32-S2, ESP32-S3 +- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55, SAML21, SAML22, SAME7x +- **NordicSemi:** nRF52833, nRF52840 +- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505 +- **NXP:** + + - iMX RT Series: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064 + - Kinetis: KL25 + - LPC Series: 11u, 13, 15, 17, 18, 40, 43, 51u, 54, 55 + +- **Raspberry Pi:** RP2040 +- **Renesas:** RX63N, RX65N +- **Silabs:** EFM32GG12 +- **Sony:** CXD56 +- **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 both FullSpeed and HighSpeed +- **TI:** MSP430 +- **ValentyUSB:** eptri + +Here is the list of `Supported Devices`_ that can be used with provided examples. + +Device Stack +============ + +Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported: + +- Audio Class 2.0 (UAC2) +- Bluetooth Host Controller Interface (BTH HCI) +- Communication Class (CDC) +- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme +- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ... +- Mass Storage Class (MSC): with multiple LUNs +- Musical Instrument Digital Interface (MIDI) +- Network with RNDIS, CDC-ECM (work in progress) +- USB Test and Measurement Class (USBTMC) +- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file. +- `WebUSB `__ with vendor-specific class + +If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface [raspberrypi/pico-sdk#197](https://github.com/raspberrypi/pico-sdk/pull/197) + +Host Stack +========== + +- Human Interface Device (HID): Keyboard, Mouse, Generic +- Mass Storage Class (MSC) +- Hub currently only supports 1 level of hub (due to my laziness) + +OS Abstraction layer +==================== + +TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box. + +- **No OS** +- **FreeRTOS** +- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example) + +Local Docs +========== + +- Info + + - `Uses`_ + - `Changelog`_ + - `Contributors`_ + +- `Reference`_ + + - `Supported Devices`_ + - `Gettin Started`_ + - `Concurrency`_ + +- `Contributing`_ + + - `Code of Conduct`_ + - `Structure`_ + - `Porting`_ + +License +======= + +All TinyUSB sources in the ``src`` folder are licensed under MIT +license, `Full license is here `__. However, each file can be +individually licensed especially those in ``lib`` and ``hw/mcu`` folder. +Please make sure you understand all the license term for files you use +in your project. + + +.. |Build Status| image:: https://github.com/hathach/tinyusb/workflows/Build/badge.svg + :target: https://github.com/hathach/tinyusb/actions +.. |Documentation Status| image:: https://readthedocs.org/projects/tinyusb/badge/?version=latest + :target: https://openinput.readthedocs.io/en/latest/?badge=latest +.. |License| image:: https://img.shields.io/badge/license-MIT-brightgreen.svg + :target: https://opensource.org/licenses/MIT + + +.. _Uses: docs/info/uses.rst +.. _Changelog: docs/info/changelog.rst +.. _Contributors: CONTRIBUTORS.rst +.. _Reference: docs/reference/index.rst +.. _Supported Devices: docs/reference/supported.rst +.. _Gettin Started: docs/reference/getting_started.rst +.. _Concurrency: docs/reference/concurrency.rst +.. _Contributing: docs/contributing/index.rst +.. _Code of Conduct: CODE_OF_CONDUCT.rst +.. _Structure: docs/contributing/structure.rst +.. _Porting: docs/contributing/porting.rst diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 00000000..01c763ba --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/stack.svg b/docs/assets/stack.svg new file mode 100644 index 00000000..85fe35e9 --- /dev/null +++ b/docs/assets/stack.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/boards.md b/docs/boards.md deleted file mode 100644 index 6be7597e..00000000 --- a/docs/boards.md +++ /dev/null @@ -1,216 +0,0 @@ -# Boards - -The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices -- One LED : for status -- One Button : to get input from user -- One UART : optional for device, but required for host examples - -## Supported Boards - -This code base already had supported for a handful of following boards (sorted alphabetically) - -### Dialog DA146xx - -- [DA14695 Development Kit – USB](https://www.dialog-semiconductor.com/products/da14695-development-kit-usb) -- [DA1469x Development Kit – Pro](https://www.dialog-semiconductor.com/products/da14695-development-kit-pro) - -### Espressif ESP32-S2 - -- Adafruit Feather ESP32-S2 -- [Adafruit Magtag 2.9" E-Ink WiFi Display](https://www.adafruit.com/product/4800) -- [Adafruit Metro ESP32-S2](https://www.adafruit.com/product/4775) -- [ESP32-S2-Kaluga-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html) -- [ESP32-S2-Saola-1](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html) - -### MicroChip SAMD11 & SAMD21 - -- [Adafruit Circuit Playground Express](https://www.adafruit.com/product/3333) -- [Adafruit Feather M0 Express](https://www.adafruit.com/product/3403) -- [Adafruit ItsyBitsy M0 Express](https://www.adafruit.com/product/3727) -- [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505) -- [Great Scott Gadgets LUNA](https://greatscottgadgets.com/luna/) -- [Microchip SAMD11 Xplained Pro](https://www.microchip.com/developmenttools/ProductDetails/atsamd11-xpro) -- [Microchip SAMD21 Xplained Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAMD21-XPRO) -- [Seeeduino Xiao](https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html) - -### MicroChip SAMD51 & SAME54 - -- [Adafruit Feather M4 Express](https://www.adafruit.com/product/3857) -- [Adafruit ItsyBitsy M4 Express](https://www.adafruit.com/product/3800) -- [Adafruit PyBadge](https://www.adafruit.com/product/4200) -- [Adafruit PyPortal](https://www.adafruit.com/product/4116) -- [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382) -- [D5035-01](https://github.com/RudolphRiedel/USB_CAN-FD) -- [Microchip SAME54 Xplained Pro](https://www.microchip.com/developmenttools/productdetails/atsame54-xpro) - -### MicroChip SAMG - -- [Microchip SAMG55 Xplained Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/ATSAMG55-XPRO) - -### MicroChip SAML2x - -- [SAML21 Xplaind Pro](https://www.microchip.com/DevelopmentTools/ProductDetails/ATSAML21-XPRO-B) -- [SAML22 Feather](https://github.com/joeycastillo/Feather-Projects/tree/main/SAML22%20Feather) -- [Sensor Watch](https://github.com/joeycastillo/Sensor-Watch) - -### Nordic nRF5x - -- [Adafruit Circuit Playground Bluefruit](https://www.adafruit.com/product/4333) -- [Adafruit CLUE](https://www.adafruit.com/product/4500) -- [Adafruit Feather nRF52840 Express](https://www.adafruit.com/product/4062) -- [Adafruit Feather nRF52840 Sense](https://www.adafruit.com/product/4516) -- [Adafruit ItsyBitsy nRF52840 Express](https://www.adafruit.com/product/4481) -- [Arduino Nano 33 BLE](https://store.arduino.cc/usa/nano-33-ble) -- [Arduino Nano 33 BLE Sense](https://store.arduino.cc/usa/nano-33-ble-sense) -- [Maker Diary nRF52840 MDK Dongle](https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle) -- [Nordic nRF52840 Development Kit (aka pca10056)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) -- [Nordic nRF52840 Dongle (aka pca10059)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-Dongle) -- [Nordic nRF52833 Development Kit (aka pca10100)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52833-DK) -- [Raytac MDBT50Q-RX Dongle](https://www.raytac.com/product/ins.php?index_id=89) - -### Nuvoton - -- NuTiny SDK NUC120 -- [NuTiny NUC121S](https://direct.nuvoton.com/en/nutiny-nuc121s) -- [NuTiny NUC125S](https://direct.nuvoton.com/en/nutiny-nuc125s) -- [NuTiny NUC126V](https://direct.nuvoton.com/en/nutiny-nuc126v) -- [NuTiny SDK NUC505Y](https://direct.nuvoton.com/en/nutiny-nuc505y) - -### NXP iMX RT - -- [MIMX RT1010 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1010-evaluation-kit:MIMXRT1010-EVK) -- [MIMX RT1015 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1015-evaluation-kit:MIMXRT1015-EVK) -- [MIMX RT1020 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1020-evaluation-kit:MIMXRT1020-EVK) -- [MIMX RT1050 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1050-evaluation-kit:MIMXRT1050-EVK) -- [MIMX RT1060 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1060-evk-i.mx-rt1060-evaluation-kit:MIMXRT1060-EVK) -- [MIMX RT1064 Evaluation Kit](https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/mimxrt1064-evk-i.mx-rt1064-evaluation-kit:MIMXRT1064-EVK) -- [Teensy 4.0 Development Board](https://www.pjrc.com/store/teensy40.html) - -### NXP Kinetis - -- [FRDM-KL25Z](https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z) - -### NXP LPC 11-13-15 - -- [LPCXpresso 11u37](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso-board-for-lpc11u37h:OM13074) -- [LPCXpresso 11u68](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058) -- [LPCXpresso 1347](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045) -- [LPCXpresso 1549](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1500-cortex-m3/lpcxpresso-board-for-lpc1549:OM13056) - -### NXP LPC 17-40 - -- [ARM mbed LPC1768](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/arm-mbed-lpc1768-board:OM11043) -- [Embedded Artists LPC4088 Quick Start board](https://www.embeddedartists.com/products/lpc4088-quickstart-board) -- [LPCXpresso 1769](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1769:OM13000) - -### NXP LPC 18-43 - -- [Embedded Artists LPC4357 Developer Kit](http://www.embeddedartists.com/products/kits/lpc4357_kit.php) -- [Keil MCB1800 Evaluation Board](http://www.keil.com/mcb1800) -- [LPCXpresso18S37 Development Board](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc4000-cortex-m4/lpcxpresso18s37-development-board:OM13076) -- [NGX LPC4330-Xplorer](https://www.nxp.com/design/designs/lpc4330-xplorer-board:OM13027) - -### NXP LPC 51 -- [LPCXpresso 51U68](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpcxpresso51u68-for-the-lpc51u68-mcus:OM40005) - -### NXP LPC 54 - -- [LPCXpresso 54114](https://www.nxp.com/design/microcontrollers-developer-resources/lpcxpresso-boards/lpcxpresso54114-board:OM13089) - -## NXP LPC55 - -- [Double M33 Express](https://www.crowdsupply.com/steiert-solutions/double-m33-express) -- [LPCXpresso 55s28 EVK](https://www.nxp.com/design/software/development-software/lpcxpresso55s28-development-board:LPC55S28-EVK) -- [LPCXpresso 55s69 EVK](https://www.nxp.com/design/development-boards/lpcxpresso-boards/lpcxpresso55s69-development-board:LPC55S69-EVK) -- [MCU-Link](https://www.nxp.com/design/development-boards/lpcxpresso-boards/mcu-link-debug-probe:MCU-LINK) - -### Renesas RX - -- [GR-CITRUS](https://www.renesas.com/us/en/products/gadget-renesas/boards/gr-citrus) -- [Renesas RX65N Target Board](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus/rtk5rx65n0c00000br-target-board-rx65n) - -### Raspberry Pi RP2040 - -- [Adafruit Feather RP2040](https://www.adafruit.com/product/4884) -- [Adafruit ItsyBitsy RP2040](https://www.adafruit.com/product/4888) -- [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900) -- [Raspberry Pi Pico](https://www.raspberrypi.org/products/raspberry-pi-pico/) - -### Silabs - -- [EFM32GG12 Thunderboard Kit (SLTB009A)](https://www.silabs.com/development-tools/thunderboard/thunderboard-gg12-kit) - -### Sony - -- [Sony Spresense CXD5602](https://developer.sony.com/develop/spresense) - -### ST STM32 - -- [Adafruit Feather STM32F405](https://www.adafruit.com/product/4382) -- [Micro Python PyBoard v1.1](https://store.micropython.org/product/PYBv1.1) -- [STLink-V3 Mini](https://www.st.com/en/development-tools/stlink-v3mini.html) -- [STM32 L035c8 Discovery](https://www.st.com/en/evaluation-tools/32l0538discovery.html) -- [STM32 L4R5zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html) -- [STM32 F070rb Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f070rb.html) -- [STM32 F072 Evaluation](https://www.st.com/en/evaluation-tools/stm32072b-eval.html) -- [STM32 F072rb Discovery](https://www.st.com/en/evaluation-tools/32f072bdiscovery.html) -- STM32 F103c Blue Pill -- [STM32 F207zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html) -- [STM32 F303vc Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html) -- STM32 F401cc Black Pill -- [STM32 F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) -- [STM32 F411ce Black Pill](https://www.adafruit.com/product/4877) -- [STM32 F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html) -- [STM32 F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html) -- [STM32 F723e Discovery](https://www.st.com/en/evaluation-tools/32f723ediscovery.html) -- [STM32 F746zg Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f746zg.html) -- [STM32 F746g Discovery](https://www.st.com/en/evaluation-tools/32f746gdiscovery.html) -- [STM32 F767zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) -- [STM32 F769i Discovery](https://www.st.com/en/evaluation-tools/32f769idiscovery.html) -- [STM32 H743zi Nucleo](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) -- [STM32 H743i Evaluation](https://www.st.com/en/evaluation-tools/stm32h743i-eval.html) -- [STM32 H745i Discovery](https://www.st.com/en/evaluation-tools/stm32h745i-disco.html) -- [Waveshare OpenH743I-C](https://www.waveshare.com/openh743i-c-standard.htm) - -### TI - - - [MSP430F5529 USB LaunchPad Evaluation Kit](http://www.ti.com/tool/MSP-EXP430F5529LP) - -### Tomu - -- [Fomu](https://www.crowdsupply.com/sutajio-kosagi/fomu) - -## Add your own board - -If you don't possess any of supported board above. Don't worry you can easily implemented your own one by following this guide as long as the mcu is supported. - -- Create new makefile for your board at `hw/bsp//board.mk` and linker file as well if needed. -- Create new source file for your board at `hw/bsp//.c` and implement following APIs - -### Board APIs - -#### board_init() - -Is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED and button pins. -One useful clock debugging technique is to set up a PWM output at a known value such as 500hz based on the USB clock so that you can verify it is correct with a logic probe or oscilloscope. -Setup your USB in a crystal-less mode when available. That makes the code easier to port across boards. - -#### board_led_write() - -Set the pin corresponding to the led to output a value that lights the LED when `state` is true. - -#### board_button_read() - -Return current state of button, a `1` means active (pressed), a `0` means inactive. - -#### board_millis() - -The function returns the elapsed number of milliseconds since startup. On ARM this is commonly done with SysTick or Timer. This provide examples a way to measure time to blink LED or delay properly. It is only required when run examples without RTOS `CFG_TUSB_OS == OPT_OS_NONE`. - -#### board_uart_read() - -Get characters from UART peripheral. - -#### board_uart_write() - -Send characters to UART peripheral. diff --git a/docs/changelog.md b/docs/changelog.md deleted file mode 100644 index 3725c5a8..00000000 --- a/docs/changelog.md +++ /dev/null @@ -1,468 +0,0 @@ -# TinyUSB Changelog - -## 0.10.1 - 2021.06.03 - -- rework rp2040 examples and CMake build, allow better integration with pico-sdk - -### Host Controller Driver (HCD) - -- Fix rp2040 host driver: incorrect PID with low speed device with max packet size of 8 bytes -- Improve hub driver -- Remove obsolete hcd_pipe_queue_xfer()/hcd_pipe_xfer() -- Use hcd_frame_number() instead of micro frame -- Fix OHCI endpoint address and xferred_bytes in xfer complete event - -## 0.10.0 - 2021.05.28 - -- Rework tu_fifo_t with separated mutex for read and write, better support DMA with read/write buffer info. And constant address mode -- Improve audio_test example and add audio_4_channel_mic example -- Add new dfu example -- Remove pico-sdk from submodule - -### Device Controller Driver (DCD) - -- Add new DCD port for Silabs EFM32GG12 with board Thunderboard Kit (SLTB009A) -- Add new DCD port Renesas RX63N, board GR-CITRUS -- Add new (optional) endpoint API dcd_edpt_xfer_fifo -- Fix build with nRF5340 -- Fix build with lpc15 and lpc54 -- Fix build with lpc177x_8x -- STM32 Synopsys: greatly improve Isochronous transfer with edpt_xfer_fifo API -- Support LPC55 port1 highspeed -- Add support for Espressif esp32s3 -- nRF: fix race condition that could cause drop packet of Bulk OUT transfer - -### USB Device Driver (USBD) - -- Add new (optional) endpoint ADPI usbd_edpt_xfer_fifo - -### Device Class Driver - -CDC - -- [Breaking] tud_cdc_peek(), tud_vendor_peek() no longer support random offset and dropped position parameter. - -DFU - -- Add new DFU 1.1 class driver (WIP) - -HID - -- Fix keyboard report descriptor template -- Add more hid keys constant from 0x6B to 0xA4 -- [Breaking] rename API - - HID_PROTOCOL_NONE/KEYBOARD/MOUST to HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE - - tud_hid_boot_mode() to tud_hid_get_protocol() - - tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb() - -MIDI - -- Fix MIDI buffer overflow issue -- [Breaking] rename API - - Rename tud_midi_read() to tud_midi_stream_read() - - Rename tud_midi_write() to tud_midi_stream_write() - - Rename tud_midi_receive() to tud_midi_packet_read() - - Rename tud_midi_send() to tud_midi_packet_write() - -### Host Controller Driver (HCD) - -- No noticable changes - -### USB Host Driver (USBH) - -- No noticable changes - -### Host Class Driver - -- HID: Rework host hid driver, basically everything changes - -## 0.9.0 - 2021.03.12 - -### Device Stack - -#### Device Controller Driver (DCD) - -RP2040 - -- Fix endpoint buffer reallocation overrun problem -- Fix osal_pico queue overflow in initialization -- Fix Isochronous endpoint buffer size in transfer -- Optimize hardware endpoint struct to reduce RAM usage -- Fix enum walkaround forever check for SE0 when pull up is disabled - -Sony CXD56 - -- Pass the correct speed on Spresense -- Fix setup processed flag - -NXP Transdimention - -- Update dcd_init() to reset controller to device mode - -#### USB Device Driver (USBD) - -- Fix issue with status zlp (tud_control_status) is returned by class driver with SET/CLEAR_FEATURE for endpoint. -- Correct endpoint size check for fullspeed bulk, can be 8, 16, 32, 64 -- Ack SET_INTERFACE even if it is not implemented by class driver. - -#### Device Class Driver - -DFU Runtime - -- rename dfu_rt to dfu_runtime for easy reading - -CDC - -- Add tud_cdc_send_break_cb() to support break request -- Improve CDC receive, minor behavior changes: when tud_cdc_rx_wanted_cb() is invoked wanted_char may not be the last byte in the fifo - -HID - -- [Breaking] Add itf argument to hid API to support multiple instances, follow API has signature changes - - tud_hid_descriptor_report_cb() - - tud_hid_get_report_cb() - - tud_hid_set_report_cb() - - tud_hid_boot_mode_cb() - - tud_hid_set_idle_cb() -- Add report complete callback tud_hid_report_complete_cb() API -- Add DPad/Hat support for HID Gamepad - - TUD_HID_REPORT_DESC_GAMEPAD() now support 16 buttons, 2 joysticks, 1 hat/dpad - - Add hid_gamepad_report_t along with GAMEPAD_BUTTON_ and GAMEPAD_HAT_ enum - - Add Gamepad to hid_composite / hid_composite_freertos example - -MIDI - -- Fix dropping MIDI sysex message when fifo is full -- Fix typo in tud_midi_write24(), make example less ambigous for cable and channel -- Fix incorrect endpoint descriptor length, MIDI v1 use Audio v1 which has 9-byte endpoint descriptor (instead of 7) - -### Host Stack - -#### Host Controller Driver (HCD) - -- Add rhport to hcd_init() -- Improve EHCI/OHCI driver abstraction - - Move echi/ohci files to portable/ - - Rename hcd_lpc18_43 to hcd_transdimension - - Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr() -- Update NXP transdimention hcd_init() to reset controller to host mode - - Ported hcd to rt10xx - -#### USB Host Driver (USBH) - -- No noticeable changes to usbh - -#### Host Class Driver - -MSC - -- Rename tuh_msc_scsi_inquiry() to tuh_msc_inquiry() -- Rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming -- Change tuh_msc_is_busy() to tuh_msc_ready() -- Add read10 and write10 function: tuh_msc_read10(), tuh_msc_write10() -- Read_Capacity is invoked as part of enumeration process -- Add tuh_msc_get_block_count(), tuh_msc_get_block_size() -- Add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities - -### Others - -- Add basic support for rt-thread OS -- Change zero bitfield length to more explicit padding -- Build example now fetch required submodules on the fly while running `make` without prio submodule init for mcu drivers -- Update pico-sdk to v1.1.0 - -**New Boards** - -- Microchip SAM E54 Xplained Pro -- LPCXpresso 55s28 -- LPCXpresso 18s37 - -## 0.8.0 - 2021.02.05 - -### Device Controller Driver - -- Added new device support for Raspberry Pi RP2040 -- Added new device support for NXP Kinetis KL25ZXX -- Use dcd_event_bus_reset() with link speed to replace bus_signal -- ESP32-S2: - - Add bus suspend and wakeup support -- SAMD21: - - Fix (walkaround) samd21 setup_packet overflow by USB DMA -- STM32 Synopsys: - - Rework USB FIFO allocation scheme and allow RX FIFO size reduction -- Sony CXD56 - - Update Update Spresense SDK to 2.0.2 - - Fix dcd issues with setup packets - - Correct EP number for cdc_msc example - -### USB Device - -**USBD** - -- Rework usbd control transfer to have additional stage parameter for setup, data, status -- Fix tusb_init() return true instead of TUSB_ERROR_NONE -- Added new API tud_connected() that return true after device got out of bus reset and received the very first setup packet - -**Class Driver** - -- CDC - - Allow to transmit data, even if the host does not support control line states i.e set DTR -- HID - - change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64 -- MIDI - - Fix midi sysex sending bug -- MSC - - Invoke only scsi complete callback after status transaction is complete. - - Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error. -- USBTMC - - Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu - -**Example** - -- Support make from windows cmd.exe -- Add HID Consumer Control (media keys) to hid_composite & hid_composite_freertos examples - -### USB Host - -No noticeable changes to host stack - -### New Boards - -- NXP/Freescale Freedom FRDM-KL25Z -- Feather Double M33 express -- Raspberry Pi Pico -- Adafruit Feather RP2040 -- Adafruit Itsy Bitsy RP2040 -- Adafruit QT RP2040 -- Adfruit Feather ESP32-S2 -- Adafruit Magtag 29" Eink -- Adafruit Metro ESP32-S2 -- Adafruit PyBadge -- Adafruit PyPortal -- Great Scott Gadgets' LUNA D11 & D21 - -## 0.7.0 - 2020.11.08 - -### Device Controller Driver - -- Added new support for Espressif ESP32-S2 -- Added new support for Dialog DA1469x -- Enhance STM32 Synopsys - - Support bus events disconnection/suspend/resume/wakeup - - Improve transfer performance with optimizing xfer and fifo size - - Support Highspeed port (OTG_HS) with both internal and external PHY - - Support multiple usb ports with rhport=1 is highspeed on selected MCUs e.g H743, F23. It is possible to have OTG_HS to run on Fullspeed PHY (e.g lacking external PHY) - - Add ISO transfer, fix odd/even frame - - Fix FIFO flush during stall - - Implement dcd_edpt_close() API - - Support F105, F107 -- Enhance STM32 fsdev - - Improve dcd fifo allocation - - Fix ISTR race condition - - Support remap USB IRQ on supported MCUs - - Implement dcd_edpt_close() API -- Enhance NUC 505: enhance set configure behavior -- Enhance SAMD - - Fix race condition with setup packet - - Add SAMD11 option `OPT_MCU_SAMD11` - - Add SAME5x option `OPT_MCU_SAME5X` -- Fix SAMG control data toggle and stall race condition -- Enhance nRF - - Fix hanged when tud_task() is called within critical section (disabled interrupt) - - Fix disconnect bus event not submitted - - Implement ISO transfer and dcd_edpt_close() - -### USB Device - -**USBD** - -- Add new class driver for **Bluetooth HCI** class driver with example can be found in [mynewt-tinyusb-example](https://github.com/hathach/mynewt-tinyusb-example) since it needs mynewt OS to run with. -- Fix USBD endpoint usage racing condition with `usbd_edpt_claim()/usbd_edpt_release()` -- Added `tud_task_event_ready()` and `osal_queue_empty()`. This API is needed to check before enter low power mode with WFI/WFE -- Rename USB IRQ Handler to `dcd_int_handler()`. Application must define IRQ handler in which it calls this API. -- Add `dcd_connect()` and `dcd_disconnect()` to enable/disable internal pullup on D+/D- on supported MCUs. -- Add `usbd_edpt_open()` -- Remove `dcd_set_config()` -- Add *OPT_OS_CUMSTOM* as hook for application to overwrite and/or add their own OS implementation -- Support SET_INTERFACE, GET_INTERFACE request -- Add Logging for debug with optional uart/rtt/swo printf retarget or `CFG_TUSB_DEBUG_PRINTF` hook -- Add IAR compiler support -- Support multiple configuration descriptors. `TUD_CONFIG_DESCRIPTOR()` template has extra config_num as 1st argument -- Improve USB Highspeed support with actual link speed detection with `dcd_event_bus_reset()` -- Enhance class driver management - - `usbd_driver_open()` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver - - Add application implemented class driver via `usbd_app_driver_get_cb()` - - IAD is handled to assign driver id -- Added `tud_descriptor_device_qualifier_cb()` callback -- Optimize `tu_fifo` bulk write/read transfer -- Forward non-std control request to class driver -- Let application handle Microsoft OS 1.0 Descriptors (the 0xEE index string) -- Fix OSAL FreeRTOS yield from ISR - -**Class Drivers** - -- USBNET: remove ACM-EEM due to lack of support from host -- USBTMC: fix descriptors when INT EP is disabled -- CDC: - - Send zero length packet for end of data when needed - - Add `tud_cdc_tx_complete_cb()` callback - - Change tud_cdc_n_write_flush() return number of bytes forced to transfer, and flush when writing enough data to fifo -- MIDI: - - Add packet interface - - Add multiple jack descriptors - - Fix MIDI driver for sysex -- DFU Runtime: fix response to SET_INTERFACE and DFU_GETSTATUS request -- Rename some configure macro to make it clear that those are used directly for endpoint transfer - - CFG_TUD_HID_BUFSIZE to `CFG_TUD_HID_EP_BUFSIZE - - CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE - - CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE - - CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE -- HID: - - Fix gamepad template descriptor - - Add multiple HID interface API - - Add extra comma to HID_REPORT_ID - -### USB Host - -- Rework USB host stack (still work in progress) - - Fix compile error with pipehandle - - Rework usbh control and enumeration as non-blocking -- Improve Hub, MSC, HID host driver - -### Examples - -- Add new hid_composite_freertos -- Add new dynamic_configuration to demonstrate how to switch configuration descriptors -- Add new hid_multiple_interface -- Enhance `net_lwip_webserver` example - - Add multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both) - - Update lwip to STABLE-2_1_2_RELEASE for net_lwip_webserver -- Added new Audio example: audio_test uac2_headsest - -### New Boards - -- Espressif ESP32-S2: saola_1, kaluga_1 -- STM32: F746 Nucleo, H743 Eval, H743 Nucleo, F723 discovery, stlink v3 mini, STM32L4r5 Nucleo -- Dialog DA1469x dk pro and dk usb -- Microchip: Great Scoot Gadgets' LUNA, samd11_xplained, D5035-01, atsamd21 xplained pro -- nRF: ItsyBitsy nRF52840 - -## 0.6.0 - 2020.03.30 - -Added **CONTRIBUTORS.md** to give proper credit for contributors to the stack. Special thanks to [Nathan Conrad](https://github.com/pigrew), [Peter Lawrence](https://github.com/majbthrd) and [William D. Jones](https://github.com/cr1901) and others for spending their precious time to add lots of features and ports for this release. - -### Added - -**MCUs** - -- Added support for Microchip SAMG55 -- Added support for Nordic nRF52833 -- Added support for Nuvoton: NUC120, NUC121/NUC125, NUC126, NUC505 -- Added support for NXP LPC: 51Uxx, 54xxx, 55xx -- Added support for NXP iMXRT: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064 -- Added support for Sony CXD56 (Spresense) -- Added support for STM32: L0, F0, F1, F2, F3, F4, F7, H7 -- Added support for TI MSP430 -- Added support for ValentyUSB's eptri - -**Class Driver** - -- Added DFU Runtime class driver -- Added Network class driver with RNDIS, CDC-ECM, CDC-EEM (work in progress) -- Added USBTMC class driver -- Added WebUSB class driver using vendor-specific class -- Added multiple instances support for CDC and MIDI -- Added a handful of unit test with Ceedling. -- Added LOG support for debugging with CFG_TUSB_DEBUG -- Added `tud_descriptor_bos_cb()` for BOS descriptor (required for USB 2.1) -- Added `dcd_edpt0_status_complete()` as optional API for DCD - -**Examples** - -Following examples are added: - -- board_test -- cdc_dual_ports -- dfu_rt -- hid_composite -- net_lwip_webserver -- usbtmc -- webusb_serial - -**Boards** - -Following boards are added: - -- adafruit_clue -- arduino_nano33_ble -- circuitplayground_bluefruit -- circuitplayground_express -- feather_m0_express -- feather_nrf52840_sense -- feather_stm32f405 -- fomu -- itsybitsy_m0 -- itsybitsy_m4 -- lpcxpresso11u37 -- lpcxpresso1549 -- lpcxpresso51u68 -- lpcxpresso54114 -- lpcxpresso55s69 -- mbed1768 -- mimxrt1010_evk -- mimxrt1015_evk -- mimxrt1020_evk -- mimxrt1050_evkb -- mimxrt1060_evk -- mimxrt1064_evk -- msp_exp430f5529lp -- ngx4330 -- nrf52840_mdk_dongle -- nutiny_nuc121s -- nutiny_nuc125s -- nutiny_nuc126v -- nutiny_sdk_nuc120 -- nutiny_sdk_nuc505 -- pca10059 -- pca10100 -- pyboardv11 -- raytac_mdbt50q_rx -- samg55xplained -- seeeduino_xiao -- spresense -- stm32f070rbnucleo -- stm32f072disco -- stm32f103bluepill -- stm32f207nucleo -- stm32f401blackpill -- stm32f411blackpill -- stm32f411disco -- stm32f412disco -- stm32f767nucleo -- stm32h743nucleo -- stm32l0538disco -- stm32l476disco -- teensy_40 - -### Changed - -- Changed `tud_descriptor_string_cb()` to have additional Language ID argument -- Merged hal_nrf5x.c into dcd_nrf5x.c -- Merged dcd_samd21.c and dcd_samd51.c into dcd_samd.c -- Generalized dcd_stm32f4.c to dcd_synopsys.c -- Changed cdc_msc_hid to cdc_msc (drop hid) due to limited endpoints number of some MCUs -- Improved DCD SAMD stability, fix missing setup packet occasionally -- Improved usbd/usbd_control with proper hanlding of zero-length packet (ZLP) -- Improved STM32 DCD FSDev -- Improved STM32 DCD Synopsys -- Migrated CI from Travis to Github Action -- Updated nrfx submodule to 2.1.0 -- Fixed mynewt osal queue definition -- Fixed cdc_msc_freertos example build for all MCUs - -## 0.5.0 (Initial Release) - 2019.07.10 - -First release, device stack works great, host stack works but still need improvement. -- Special thanks to @adafruit team, especially @tannewt to help out immensely to rework device stack: simplify osal & control transfer, adding SAMD21/SAMD51 ports, writing porting docs, adding MIDI class support etc... -- Thanks to @cr1901 for adding STM32F4 port. -- Thanks to @PTS93 and @todbot for HID raw API diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 00000000..c7a17478 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,42 @@ +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + + +# -- Project information ----------------------------------------------------- + +project = 'TinyUSB' +copyright = '2021, Ha Thach' +author = 'Ha Thach' + + +# -- General configuration --------------------------------------------------- + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.intersphinx', + 'sphinx.ext.todo', + 'sphinx_autodoc_typehints', + 'sphinxemoji.sphinxemoji', +] + +templates_path = ['_templates'] + +exclude_patterns = ['_build'] + + +# -- Options for HTML output ------------------------------------------------- + +html_theme = 'furo' +html_title = 'TinyUSB' +html_logo = 'assets/logo.svg' +html_favicon = 'assets/logo.svg' +html_theme_options = { + 'sidebar_hide_name': True, +} + +todo_include_todos = True diff --git a/docs/contributing/code_of_conduct.rst b/docs/contributing/code_of_conduct.rst new file mode 120000 index 00000000..b52bf14c --- /dev/null +++ b/docs/contributing/code_of_conduct.rst @@ -0,0 +1 @@ +../../CODE_OF_CONDUCT.rst \ No newline at end of file diff --git a/docs/contributing/index.rst b/docs/contributing/index.rst new file mode 100644 index 00000000..c572894a --- /dev/null +++ b/docs/contributing/index.rst @@ -0,0 +1,23 @@ +************ +Contributing +************ + +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. + +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 +parties. + +Index +===== + +.. toctree:: + :maxdepth: 2 + + code_of_conduct + structure + porting diff --git a/docs/porting.md b/docs/contributing/porting.rst similarity index 61% rename from docs/porting.md rename to docs/contributing/porting.rst index d3c688a8..7e9e462f 100644 --- a/docs/porting.md +++ b/docs/contributing/porting.rst @@ -1,4 +1,7 @@ -# Porting + +******* +Porting +******* TinyUSB is designed to be a universal USB protocol stack for microcontrollers. It handles most of the high level USB protocol and relies on the microcontroller's USB peripheral for @@ -8,129 +11,165 @@ for the microcontroller to other projects, especially those already using TinyUS Below are instructions on how to get the cdc_msc device example running on a new microcontroller. Doing so includes adding the common code necessary for other uses while minimizing other extra code. Whenever you see a phrase or word in <> it should be replaced. -## Register defs +Register defs +------------- The first step to adding support is including the register definitions and startup code for the microcontroller in TinyUSB. We write the TinyUSB implementation against these structs instead of higher level functions to keep the code small and to prevent function name collisions in linking of larger projects. For ARM microcontrollers this is the CMSIS definitions. They should be -placed in the `hw/mcu//` directory. +placed in the ``hw/mcu//`` directory. -Once this is done, create a directory in `hw/bsp/` for the specific board you are using to test the code. (Duplicating an existing board's directory is the best way to get started.) The board should be a readily available development board so that others can also test. +Once this is done, create a directory in ``hw/bsp/`` for the specific board you are using to test the code. (Duplicating an existing board's directory is the best way to get started.) The board should be a readily available development board so that others can also test. + +Build +----- -## Build Now that those directories are in place, we can start our iteration process to get the example building successfully. To build, run from the root of TinyUSB: -`make -C examples/device/cdc_msc BOARD=` +``make -C examples/device/cdc_msc BOARD=`` Unless, you've read ahead, this will fail miserably. Now, lets get it to fail less by updating the files in the board directory. The code in the board's directory is responsible for setting up the microcontroller's clocks and pins so that USB works. TinyUSB itself only operates on the USB peripheral. The board directory also includes information what files are needed to build the example. -One of the first things to change is the `-DCFG_TUSB_MCU` cflag in the `board.mk` file. This is used to tell TinyUSB what platform is being built. So, add an entry to `src/tusb_option.h` and update the CFLAG to match. +One of the first things to change is the ``-DCFG_TUSB_MCU`` cflag in the ``board.mk`` file. This is used to tell TinyUSB what platform is being built. So, add an entry to ``src/tusb_option.h`` and update the CFLAG to match. -Update `board.mk`'s VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from `src/portable` into `src/portable//` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling. +Update ``board.mk``\ 's VENDOR and CHIP_FAMILY values when creating the directory for the struct files. Duplicate one of the other sources from ``src/portable`` into ``src/portable//`` and delete all of the implementation internals. We'll cover what everything there does later. For now, get it compiling. -## Implementation -At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the `board.mk` to include specific CFLAGS, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo. +Implementation +-------------- + +At this point you should get an error due to an implementation issue and hopefully the build is setup for the new MCU. You will still need to modify the ``board.mk`` to include specific CFLAGS, the linker script, linker flags, source files, include directories. All file paths are relative to the top of the TinyUSB repo. + +Board Support (BSP) +^^^^^^^^^^^^^^^^^^^ -### Board Support (BSP) The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. Its responsible for getting the MCU started and the USB peripheral clocked. It also optionally provides LED definitions that are used to blink an LED to show that the code is running. -It is located in `hw/bsp//board_.c`. +It is located in ``hw/bsp//board_.c``. -#### board_init -`board_init` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins. +board_init +~~~~~~~~~~ + +``board_init`` is responsible for starting the MCU, setting up the USB clock and USB pins. It is also responsible for initializing LED pins. One useful clock debugging technique is to set up a PWM output at a known value such as 500hz based on the USB clock so that you can verify it is correct with a logic probe or oscilloscope. Setup your USB in a crystal-less mode when available. That makes the code easier to port across boards. -#### board_led_write -Feel free to skip this until you want to verify your demo code is running. To implement, set the pin corresponding to the led to output a value that lights the LED when `state` is true. +board_led_write +~~~~~~~~~~~~~~~ -### OS Abstraction Layer (OSAL) +Feel free to skip this until you want to verify your demo code is running. To implement, set the pin corresponding to the led to output a value that lights the LED when ``state`` is true. + +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 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``. -### Device API +Device API +^^^^^^^^^^ -After the USB device is setup, the USB device code works by processing events on the main thread (by calling `tud_task`). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing. +After the USB device is setup, the USB device code works by processing events on the main thread (by calling ``tud_task``\ ). These events are queued by the USB interrupt handler. So, there are three parts to the device low-level API: device setup, endpoint setup and interrupt processing. -All of the code for the low-level device API is in `src/portable///dcd_.c`. +All of the code for the low-level device API is in ``src/portable///dcd_.c``. -#### Device Setup +Device Setup +~~~~~~~~~~~~ -##### dcd_init +dcd_init +"""""""" Initializes the USB peripheral for device mode and enables it. This function should enable internal D+/D- pull-up for enumeration. -##### dcd_int_enable / dcd_int_disable +dcd_int_enable / dcd_int_disable +"""""""""""""""""""""""""""""""" 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_int_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. -##### dcd_set_address +dcd_set_address +""""""""""""""" Called when the device is given a new bus address. If your peripheral automatically changes address during enumeration (like the nrf52) you may leave this empty and also no queue an event for the corresponding SETUP packet. -##### dcd_remote_wakeup +dcd_remote_wakeup +""""""""""""""""" Called to remote wake up host when suspended (e.g hid keyboard) -##### dcd_connect / dcd_disconnect +dcd_connect / dcd_disconnect +"""""""""""""""""""""""""""" Connect or disconnect the data-line pull-up resistor. Define only if MCU has an internal pull-up. (BSP may define for MCU without internal pull-up.) -#### Special events +Special events +~~~~~~~~~~~~~~ You must let TinyUSB know when certain events occur so that it can continue its work. There are a few methods you can call to queue events for TinyUSB to process. -##### dcd_event_bus_signal +dcd_event_bus_signal +"""""""""""""""""""" There are a number of events that your peripheral may communicate about the state of the bus. Here is an overview of what they are. Events in **BOLD** must be provided for TinyUSB to work. + * **DCD_EVENT_RESET** - Triggered when the host resets the bus causing the peripheral to reset. Do any other internal reset you need from the interrupt handler such as resetting the control endpoint. * DCD_EVENT_SOF - Signals the start of a new USB frame. Calls to this look like: - dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true); +.. code-block:: -The first `0` is the USB peripheral number. Statically saying 0 is common for single USB device MCUs. + dcd_event_bus_signal(0, DCD_EVENT_BUS_RESET, true); -The `true` indicates the call is from an interrupt handler and will always be the case when porting in this way. -##### dcd_setup_received +The first ``0`` is the USB peripheral number. Statically saying 0 is common for single USB device MCUs. -SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered `0`. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well. +The ``true`` indicates the call is from an interrupt handler and will always be the case when porting in this way. + +dcd_setup_received +"""""""""""""""""" + +SETUP packets are a special type of transaction that can occur at any time on the control endpoint, numbered ``0``. Since they are unique, most peripherals have special handling for them. Their data is always 8 bytes in length as well. Calls to this look like: - dcd_event_setup_received(0, setup, true); +.. code-block:: -As before with `dcd_event_bus_signal` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue. + dcd_event_setup_received(0, setup, true); -#### Endpoints + +As before with ``dcd_event_bus_signal`` the first argument is the USB peripheral number and the third is true to signal its being called from an interrupt handler. The middle argument is byte array of length 8 with the contents of the SETUP packet. It can be stack allocated because it is copied into the queue. + +Endpoints +~~~~~~~~~ Endpoints are the core of the USB data transfer process. They come in a few forms such as control, isochronous, bulk, and interrupt. We won't cover the details here except with some caveats in open below. In general, data is transferred by setting up a buffer of a given length to be transferred on a given endpoint address and then waiting for an interrupt to signal that the transfer is finished. Further details below. -Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides `tu_edpt_number` and `tu_edpt_dir` to unpack this data from the address. Here is a snippet that does it. +Endpoints within USB have an address which encodes both the number and direction of an endpoint. TinyUSB provides ``tu_edpt_number`` and ``tu_edpt_dir`` to unpack this data from the address. Here is a snippet that does it. - uint8_t epnum = tu_edpt_number(ep_addr); - uint8_t dir = tu_edpt_dir(ep_addr); +.. code-block:: -##### dcd_edpt_open + uint8_t epnum = tu_edpt_number(ep_addr); + uint8_t dir = tu_edpt_dir(ep_addr); + + +dcd_edpt_open +""""""""""""" Opening an endpoint is done for all non-control endpoints once the host picks a configuration that the device should use. At this point, the endpoint should be enabled in the peripheral and configured to match the endpoint descriptor. Pay special attention to the direction of the endpoint you can get from the helper methods above. It will likely change what registers you are setting. Also make sure to enable endpoint specific interrupts. -##### dcd_edpt_close +dcd_edpt_close +"""""""""""""" Close an endpoint. his function is used for implementing alternate settings. @@ -138,16 +177,17 @@ After calling this, the device should not respond to any packets directed toward 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 +""""""""""""" -`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. +``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. Besides that, all other transactions are relatively straight-forward. The endpoint address provides the endpoint number and direction which usually determines where to write the buffer info. The buffer and its length are usually written to a specific location in memory and the peripheral is told the data is valid. (Maybe by writing a 1 to a register or setting a counter register to 0 for OUT or length for IN.) -The transmit buffer alignment is determined by `CFG_TUSB_MEM_ALIGN`. +The transmit buffer alignment is determined by ``CFG_TUSB_MEM_ALIGN``. One potential pitfall is that the buffer may be longer than the maximum endpoint size of one USB packet. Some peripherals can handle transmitting multiple USB packets for a provided buffer (like the SAMD21). @@ -155,37 +195,47 @@ 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 guarenteed 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. -For control transfers, this is automatically done in `usbd_control.c`. +For control transfers, this is automatically done in ``usbd_control.c``. At the moment, only a single buffer can be transmitted at once. There is no provision for double-buffering. new dcd_edpt_xfer() will not be called again on the same endpoint address until the driver calls dcd_xfer_complete() (except in cases of USB resets). -##### dcd_xfer_complete +dcd_xfer_complete +""""""""""""""""" Once a transfer completes you must call dcd_xfer_complete from the USB interrupt handler to let TinyUSB know that a transaction has completed. Here is a sample call: - dcd_event_xfer_complete(0, ep_addr, xfer->actual_len, XFER_RESULT_SUCCESS, true); +.. code-block:: + + dcd_event_xfer_complete(0, ep_addr, xfer->actual_len, XFER_RESULT_SUCCESS, true); + The arguments are: + + * the USB peripheral number * the endpoint address -* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in `dcd_edpt_xfer`) +* the actual length of the transfer. (OUT transfers may be smaller than the buffer given in ``dcd_edpt_xfer``\ ) * the result of the transfer. Failure isn't handled yet. -* `true` to note the call is from an interrupt handler. +* ``true`` to note the call is from an interrupt handler. -##### dcd_edpt_stall / dcd_edpt_clear_stall +dcd_edpt_stall / dcd_edpt_clear_stall +""""""""""""""""""""""""""""""""""""" -Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of `dcd_edpt_stall`, `dcd_edpt_clear_stall` help manage the stall state of all endpoints. +Stalling is one way an endpoint can indicate failure such as when an unsupported command is transmitted. The pair of ``dcd_edpt_stall``\ , ``dcd_edpt_clear_stall`` help manage the stall state of all endpoints. -## Woohoo! +Woohoo! +------- At this point you should have everything working! ;-) Of course, you may not write perfect code. Here are some tips and tricks for debugging. -Use [WireShark](https://www.wireshark.org/) or [a Beagle](https://www.totalphase.com/protocols/usb/) to sniff the USB traffic. When things aren't working its likely very early in the USB enumeration process. Figuring out where can help clue in where the issue is. For example: +Use `WireShark `_ or `a Beagle `_ to sniff the USB traffic. When things aren't working its likely very early in the USB enumeration process. Figuring out where can help clue in where the issue is. For example: + + * 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 thats 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 new file mode 100644 index 00000000..e8c65885 --- /dev/null +++ b/docs/contributing/structure.rst @@ -0,0 +1,59 @@ +********* +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 diff --git a/docs/getting_started.md b/docs/getting_started.md deleted file mode 100644 index 8ec0ea74..00000000 --- a/docs/getting_started.md +++ /dev/null @@ -1,137 +0,0 @@ -# Getting Started # - -## Add TinyUSB to your project - -It is relatively simple to incorporate tinyusb to your (existing) project - -- Copy or `git submodule` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb* -- Add all the .c in the `tinyusb/src` folder to your project -- Add *your_project/tinyusb/src* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. -- Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards). -- If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud_descriptor_** callbacks for the stack to work. -- Add tusb_init() call to your reset initialization code. -- Call `tud_int_handler()` (device) and/or `tuh_int_handler()` (host) in your USB IRQ Handler -- Implement all enabled classes's callbacks. -- If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoked within the call of that task runner. - -~~~{.c} -int main(void) -{ - your_init_code(); - tusb_init(); // initialize tinyusb stack - - while(1) // the mainloop - { - your_application_code(); - - tud_task(); // device task - tuh_task(); // host task - } -} -~~~ - -## Examples - -For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API() should be used. Most examples will work on most of [the supported Boards](boards.md). Firstly we need to `git clone` if not already - -``` -$ git clone https://github.com/hathach/tinyusb tinyusb -$ cd tinyusb -``` - -Some TinyUSB examples also requires external submodule libraries in `/lib` such as FreeRTOS, Lightweight IP to build. Run following command to fetch them - -``` -$ git submodule update --init lib -``` - -In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. Luckily, it will be fetched if needed when you run the `make` to build your board. - -Note: some examples especially those that uses Vendor class (e.g webUSB) may requires udev permission on Linux (and/or macOS) to access usb device. It depends on your OS distro, typically copy `/examples/device/99-tinyusb.rules` file to /etc/udev/rules.d/ then run `sudo udevadm control --reload-rules && sudo udevadm trigger` is good enough. - -### Build - -To build example, first change directory to an example folder. - -``` -$ cd examples/device/cdc_msc -``` - -Then compile with `make BOARD=[board_name] all`, for example - -``` -$ make BOARD=feather_nrf52840_express all -``` - -Note: `BOARD` can be found as directory name in `hw/bsp`, either in its family/boards or directly under bsp (no family). - -#### Port Selection - -If a board has several ports, one port is chosen by default in the individual board.mk file. Use option `PORT=x` To choose another port. For example to select the HS port of a STM32F746Disco board, use: - -``` -$ make BOARD=stm32f746disco PORT=1 all -``` - -#### Port Speed - -A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option `SPEED=full/high` e.g To force F723 operate at full instead of default high speed - -``` -$ make BOARD=stm32f746disco SPEED=full all -``` - -### Debug - -To compile for debugging add `DEBUG=1`, for example - -``` -$ make BOARD=feather_nrf52840_express DEBUG=1 all -``` - -#### Log - -Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional `LOG=`. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet. - -``` -$ make BOARD=feather_nrf52840_express LOG=2 all -``` - -#### Logger - -By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols: - -- `LOGGER=rtt`: use [Segger RTT protocol](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/) - - Cons: requires jlink as the debugger. - - Pros: work with most if not all MCUs - - Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package. -- `LOGGER=swo`: Use dedicated SWO pin of ARM Cortex SWD debug header. - - Cons: only work with ARM Cortex MCUs minus M0 - - Pros: should be compatible with more debugger that support SWO. - - Software viewer should be provided along with your debugger driver. - -``` -$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all -$ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all -``` - -### Flash - -`flash` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command - -``` -$ make BOARD=feather_nrf52840_express flash -$ make SERIAL=/dev/ttyACM0 BOARD=feather_nrf52840_express flash -``` - -Since jlink can be used with most of the boards, there is also `flash-jlink` target for your convenience. - -``` -$ make BOARD=feather_nrf52840_express flash-jlink -``` - -Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can be generated with `uf2` target - -``` -$ make BOARD=feather_nrf52840_express all uf2 -``` diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 00000000..2a032c51 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,25 @@ +:hide-toc: + +********* +TinyUSB +********* + +TinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems, +designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events being deferred and then handled in the non-ISR task function. + + +.. toctree:: + :caption: Index + :hidden: + + Info + Reference + Contributing + +.. toctree:: + :caption: External Links + :hidden: + + Source Code + Issue Tracker + Discussions diff --git a/docs/info/changelog.rst b/docs/info/changelog.rst new file mode 100644 index 00000000..80205a72 --- /dev/null +++ b/docs/info/changelog.rst @@ -0,0 +1,513 @@ +********* +Changelog +********* + +0.10.1 (03-06-221) +=================== + +- rework rp2040 examples and CMake build, allow better integration with pico-sdk + +Host Controller Driver (HCD) +---------------------------- + +- Fix rp2040 host driver: incorrect PID with low speed device with max packet size of 8 bytes +- Improve hub driver +- Remove obsolete hcd_pipe_queue_xfer()/hcd_pipe_xfer() +- Use hcd_frame_number() instead of micro frame +- Fix OHCI endpoint address and xferred_bytes in xfer complete event + + +0.10.0 (28-05-2021) +=================== + +- Rework tu_fifo_t with separated mutex for read and write, better support DMA with read/write buffer info. And constant address mode +- Improve audio_test example and add audio_4_channel_mic example +- Add new dfu example +- Remove pico-sdk from submodule + +Device Controller Driver (DCD) +------------------------------ + +- Add new DCD port for Silabs EFM32GG12 with board Thunderboard Kit (SLTB009A) +- Add new DCD port Renesas RX63N, board GR-CITRUS +- Add new (optional) endpoint API dcd_edpt_xfer_fifo +- Fix build with nRF5340 +- Fix build with lpc15 and lpc54 +- Fix build with lpc177x_8x +- STM32 Synopsys: greatly improve Isochronous transfer with edpt_xfer_fifo API +- Support LPC55 port1 highspeed +- Add support for Espressif esp32s3 +- nRF: fix race condition that could cause drop packet of Bulk OUT transfer + +USB Device Driver (USBD) +------------------------ + +- Add new (optional) endpoint ADPI usbd_edpt_xfer_fifo + +Device Class Driver +------------------- + +CDC + +- [Breaking] tud_cdc_peek(), tud_vendor_peek() no longer support random offset and dropped position parameter. + +DFU + +- Add new DFU 1.1 class driver (WIP) + +HID + +- Fix keyboard report descriptor template +- Add more hid keys constant from 0x6B to 0xA4 +- [Breaking] rename API + - HID_PROTOCOL_NONE/KEYBOARD/MOUST to HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE + - tud_hid_boot_mode() to tud_hid_get_protocol() + - tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb() + +MIDI + +- Fix MIDI buffer overflow issue +- [Breaking] rename API + - Rename tud_midi_read() to tud_midi_stream_read() + - Rename tud_midi_write() to tud_midi_stream_write() + - Rename tud_midi_receive() to tud_midi_packet_read() + - Rename tud_midi_send() to tud_midi_packet_write() + +Host Controller Driver (HCD) +---------------------------- + +- No noticable changes + +USB Host Driver (USBH) +---------------------- + +- No noticable changes + +Host Class Driver +----------------- + +- HID: Rework host hid driver, basically everything changes + + +0.9.0 (12-03-2021) +================== + +Device Stack +------------ + +Device Controller Driver (DCD) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +RP2040 + +- Fix endpoint buffer reallocation overrun problem +- Fix osal_pico queue overflow in initialization +- Fix Isochronous endpoint buffer size in transfer +- Optimize hardware endpoint struct to reduce RAM usage +- Fix enum walkaround forever check for SE0 when pull up is disabled + +Sony CXD56 + +- Pass the correct speed on Spresense +- Fix setup processed flag + +NXP Transdimention + +- Update dcd_init() to reset controller to device mode + +USB Device Driver (USBD) +^^^^^^^^^^^^^^^^^^^^^^^^ + +- Fix issue with status zlp (tud_control_status) is returned by class driver with SET/CLEAR_FEATURE for endpoint. +- Correct endpoint size check for fullspeed bulk, can be 8, 16, 32, 64 +- Ack SET_INTERFACE even if it is not implemented by class driver. + +Device Class Driver +^^^^^^^^^^^^^^^^^^^ + +DFU Runtime + +- rename dfu_rt to dfu_runtime for easy reading + +CDC + +- Add tud_cdc_send_break_cb() to support break request +- Improve CDC receive, minor behavior changes: when tud_cdc_rx_wanted_cb() is invoked wanted_char may not be the last byte in the fifo + +HID + +- [Breaking] Add itf argument to hid API to support multiple instances, follow API has signature changes + - tud_hid_descriptor_report_cb() + - tud_hid_get_report_cb() + - tud_hid_set_report_cb() + - tud_hid_boot_mode_cb() + - tud_hid_set_idle_cb() +- Add report complete callback tud_hid_report_complete_cb() API +- Add DPad/Hat support for HID Gamepad + - `TUD_HID_REPORT_DESC_GAMEPAD()` now support 16 buttons, 2 joysticks, 1 hat/dpad + - Add hid_gamepad_report_t along with `GAMEPAD_BUTTON_` and `GAMEPAD_HAT_` enum + - Add Gamepad to hid_composite / hid_composite_freertos example + +MIDI + +- Fix dropping MIDI sysex message when fifo is full +- Fix typo in tud_midi_write24(), make example less ambigous for cable and channel +- Fix incorrect endpoint descriptor length, MIDI v1 use Audio v1 which has 9-byte endpoint descriptor (instead of 7) + +Host Stack +---------- + +Host Controller Driver (HCD) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Add rhport to hcd_init() +- Improve EHCI/OHCI driver abstraction + - Move echi/ohci files to portable/ + - Rename hcd_lpc18_43 to hcd_transdimension + - Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr() +- Update NXP transdimention hcd_init() to reset controller to host mode + - Ported hcd to rt10xx + +USB Host Driver (USBH) +^^^^^^^^^^^^^^^^^^^^^^ + +- No noticeable changes to usbh + +Host Class Driver +^^^^^^^^^^^^^^^^^ + +MSC + +- Rename tuh_msc_scsi_inquiry() to tuh_msc_inquiry() +- Rename tuh_msc_mounted_cb/tuh_msc_unmounted_cb to tuh_msc_mount_cb/tuh_msc_unmount_cb to match device stack naming +- Change tuh_msc_is_busy() to tuh_msc_ready() +- Add read10 and write10 function: tuh_msc_read10(), tuh_msc_write10() +- Read_Capacity is invoked as part of enumeration process +- Add tuh_msc_get_block_count(), tuh_msc_get_block_size() +- Add CFG_TUH_MSC_MAXLUN (default to 4) to hold lun capacities + +Others +------ + +- Add basic support for rt-thread OS +- Change zero bitfield length to more explicit padding +- Build example now fetch required submodules on the fly while running `make` without prio submodule init for mcu drivers +- Update pico-sdk to v1.1.0 + +**New Boards** + +- Microchip SAM E54 Xplained Pro +- LPCXpresso 55s28 +- LPCXpresso 18s37 + + +0.8.0 (05-02-2021) +================== + +Device Controller Driver +------------------------ + +- Added new device support for Raspberry Pi RP2040 +- Added new device support for NXP Kinetis KL25ZXX +- Use dcd_event_bus_reset() with link speed to replace bus_signal +- ESP32-S2: + - Add bus suspend and wakeup support +- SAMD21: + - Fix (walkaround) samd21 setup_packet overflow by USB DMA +- STM32 Synopsys: + - Rework USB FIFO allocation scheme and allow RX FIFO size reduction +- Sony CXD56 + - Update Update Spresense SDK to 2.0.2 + - Fix dcd issues with setup packets + - Correct EP number for cdc_msc example + +USB Device +---------- + +**USBD** + +- Rework usbd control transfer to have additional stage parameter for setup, data, status +- Fix tusb_init() return true instead of TUSB_ERROR_NONE +- Added new API tud_connected() that return true after device got out of bus reset and received the very first setup packet + +**Class Driver** + +- CDC + - Allow to transmit data, even if the host does not support control line states i.e set DTR +- HID + - change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64 +- MIDI + - Fix midi sysex sending bug +- MSC + - Invoke only scsi complete callback after status transaction is complete. + - Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error. +- USBTMC + - Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu + +**Example** + +- Support make from windows cmd.exe +- Add HID Consumer Control (media keys) to hid_composite & hid_composite_freertos examples + + +USB Host +-------- + +No noticeable changes to host stack + +New Boards +---------- + +- NXP/Freescale Freedom FRDM-KL25Z +- Feather Double M33 express +- Raspberry Pi Pico +- Adafruit Feather RP2040 +- Adafruit Itsy Bitsy RP2040 +- Adafruit QT RP2040 +- Adfruit Feather ESP32-S2 +- Adafruit Magtag 29" Eink +- Adafruit Metro ESP32-S2 +- Adafruit PyBadge +- Adafruit PyPortal +- Great Scott Gadgets' LUNA D11 & D21 + + +0.7.0 (08-11-2020) +================== + +Device Controller Driver +------------------------ + +- Added new support for Espressif ESP32-S2 +- Added new support for Dialog DA1469x +- Enhance STM32 Synopsys +- Support bus events disconnection/suspend/resume/wakeup + - Improve transfer performance with optimizing xfer and fifo size + - Support Highspeed port (OTG_HS) with both internal and external PHY + - Support multiple usb ports with rhport=1 is highspeed on selected MCUs e.g H743, F23. It is possible to have OTG_HS to run on Fullspeed PHY (e.g lacking external PHY) + - Add ISO transfer, fix odd/even frame + - Fix FIFO flush during stall + - Implement dcd_edpt_close() API + - Support F105, F107 +- Enhance STM32 fsdev + - Improve dcd fifo allocation + - Fix ISTR race condition + - Support remap USB IRQ on supported MCUs + - Implement dcd_edpt_close() API +- Enhance NUC 505: enhance set configure behavior +- Enhance SAMD + - Fix race condition with setup packet + - Add SAMD11 option `OPT_MCU_SAMD11` + - Add SAME5x option `OPT_MCU_SAME5X` +- Fix SAMG control data toggle and stall race condition +- Enhance nRF + - Fix hanged when tud_task() is called within critical section (disabled interrupt) + - Fix disconnect bus event not submitted + - Implement ISO transfer and dcd_edpt_close() + + +USB Device +---------- + +**USBD** + +- Add new class driver for **Bluetooth HCI** class driver with example can be found in [mynewt-tinyusb-example](https://github.com/hathach/mynewt-tinyusb-example) since it needs mynewt OS to run with. +- Fix USBD endpoint usage racing condition with `usbd_edpt_claim()/usbd_edpt_release()` +- Added `tud_task_event_ready()` and `osal_queue_empty()`. This API is needed to check before enter low power mode with WFI/WFE +- Rename USB IRQ Handler to `dcd_int_handler()`. Application must define IRQ handler in which it calls this API. +- Add `dcd_connect()` and `dcd_disconnect()` to enable/disable internal pullup on D+/D- on supported MCUs. +- Add `usbd_edpt_open()` +- Remove `dcd_set_config()` +- Add *OPT_OS_CUMSTOM* as hook for application to overwrite and/or add their own OS implementation +- Support SET_INTERFACE, GET_INTERFACE request +- Add Logging for debug with optional uart/rtt/swo printf retarget or `CFG_TUSB_DEBUG_PRINTF` hook +- Add IAR compiler support +- Support multiple configuration descriptors. `TUD_CONFIG_DESCRIPTOR()` template has extra config_num as 1st argument +- Improve USB Highspeed support with actual link speed detection with `dcd_event_bus_reset()` +- Enhance class driver management + - `usbd_driver_open()` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver + - Add application implemented class driver via `usbd_app_driver_get_cb()` + - IAD is handled to assign driver id +- Added `tud_descriptor_device_qualifier_cb()` callback +- Optimize `tu_fifo` bulk write/read transfer +- Forward non-std control request to class driver +- Let application handle Microsoft OS 1.0 Descriptors (the 0xEE index string) +- Fix OSAL FreeRTOS yield from ISR + +**Class Drivers** + +- USBNET: remove ACM-EEM due to lack of support from host +- USBTMC: fix descriptors when INT EP is disabled +- CDC: + - Send zero length packet for end of data when needed + - Add `tud_cdc_tx_complete_cb()` callback + - Change tud_cdc_n_write_flush() return number of bytes forced to transfer, and flush when writing enough data to fifo +- MIDI: + - Add packet interface + - Add multiple jack descriptors + - Fix MIDI driver for sysex +- DFU Runtime: fix response to SET_INTERFACE and DFU_GETSTATUS request +- Rename some configure macro to make it clear that those are used directly for endpoint transfer + - CFG_TUD_HID_BUFSIZE to CFG_TUD_HID_EP_BUFSIZE + - CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE + - CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE + - CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE +- HID: + - Fix gamepad template descriptor + - Add multiple HID interface API + - Add extra comma to HID_REPORT_ID + +USB Host +-------- + +- Rework USB host stack (still work in progress) + - Fix compile error with pipehandle + - Rework usbh control and enumeration as non-blocking +- Improve Hub, MSC, HID host driver + +Examples +-------- + +- Add new hid_composite_freertos +- Add new dynamic_configuration to demonstrate how to switch configuration descriptors +- Add new hid_multiple_interface +- Enhance `net_lwip_webserver` example + - Add multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both) + - Update lwip to STABLE-2_1_2_RELEASE for net_lwip_webserver +- Added new Audio example: audio_test uac2_headsest + +New Boards +---------- + +- Espressif ESP32-S2: saola_1, kaluga_1 +- STM32: F746 Nucleo, H743 Eval, H743 Nucleo, F723 discovery, stlink v3 mini, STM32L4r5 Nucleo +- Dialog DA1469x dk pro and dk usb +- Microchip: Great Scoot Gadgets' LUNA, samd11_xplained, D5035-01, atsamd21 xplained pro +- nRF: ItsyBitsy nRF52840 + + +0.6.0 (30-03-2020) +================== + +Added **CONTRIBUTORS.md** to give proper credit for contributors to the stack. Special thanks to `Nathan Conrad `__ , `Peter Lawrence `__ , `William D. Jones `__ and `Sean Cross `__ and others for spending their precious time to add lots of features and ports for this release. + +Added +----- + +**MCU** + +- Added support for Microchip SAMG55 +- Added support for Nordic nRF52833 +- Added support for Nuvoton: NUC120, NUC121/NUC125, NUC126, NUC505 +- Added support for NXP LPC: 51Uxx, 54xxx, 55xx +- Added support for NXP iMXRT: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064 +- Added support for Sony CXD56 (Spresense) +- Added support for STM32: L0, F0, F1, F2, F3, F4, F7, H7 +- Added support for TI MSP430 +- Added support for ValentyUSB's eptri + +**Class Driver** + +- Added DFU Runtime class driver +- Added Network class driver with RNDIS, CDC-ECM, CDC-EEM (work in progress) +- Added USBTMC class driver +- Added WebUSB class driver using vendor-specific class +- Added multiple instances support for CDC and MIDI +- Added a handful of unit test with Ceedling. +- Added LOG support for debugging with CFG_TUSB_DEBUG +- Added `tud_descriptor_bos_cb()` for BOS descriptor (required for USB 2.1) +- Added `dcd_edpt0_status_complete()` as optional API for DCD + +**Examples** + +Following examples are added: + +- board_test +- cdc_dual_ports +- dfu_rt +- hid_composite +- net_lwip_webserver +- usbtmc +- webusb_serial + +**Boards** + +Following boards are added: + +- adafruit_clue +- arduino_nano33_ble +- circuitplayground_bluefruit +- circuitplayground_express +- feather_m0_express +- feather_nrf52840_sense +- feather_stm32f405 +- fomu +- itsybitsy_m0 +- itsybitsy_m4 +- lpcxpresso11u37 +- lpcxpresso1549 +- lpcxpresso51u68 +- lpcxpresso54114 +- lpcxpresso55s69 +- mbed1768 +- mimxrt1010_evk +- mimxrt1015_evk +- mimxrt1020_evk +- mimxrt1050_evkb +- mimxrt1060_evk +- mimxrt1064_evk +- msp_exp430f5529lp +- ngx4330 +- nrf52840_mdk_dongle +- nutiny_nuc121s +- nutiny_nuc125s +- nutiny_nuc126v +- nutiny_sdk_nuc120 +- nutiny_sdk_nuc505 +- pca10059 +- pca10100 +- pyboardv11 +- raytac_mdbt50q_rx +- samg55xplained +- seeeduino_xiao +- spresense +- stm32f070rbnucleo +- stm32f072disco +- stm32f103bluepill +- stm32f207nucleo +- stm32f401blackpill +- stm32f411blackpill +- stm32f411disco +- stm32f412disco +- stm32f767nucleo +- stm32h743nucleo +- stm32l0538disco +- stm32l476disco +- teensy_40 + +Changed +------- + +- Changed `tud_descriptor_string_cb()` to have additional Language ID argument +- Merged hal_nrf5x.c into dcd_nrf5x.c +- Merged dcd_samd21.c and dcd_samd51.c into dcd_samd.c +- Generalized dcd_stm32f4.c to dcd_synopsys.c +- Changed cdc_msc_hid to cdc_msc (drop hid) due to limited endpoints number of some MCUs +- Improved DCD SAMD stability, fix missing setup packet occasionally +- Improved usbd/usbd_control with proper hanlding of zero-length packet (ZLP) +- Improved STM32 DCD FSDev +- Improved STM32 DCD Synopsys +- Migrated CI from Travis to Github Action +- Updated nrfx submodule to 2.1.0 +- Fixed mynewt osal queue definition +- Fixed cdc_msc_freertos example build for all MCUs + + +0.5.0 (06-2019) +=============== + +First release, device stack works great, host stack works but still need improvement. + +- Special thanks to @adafruit team, especially @tannewt to help out immensely to rework device stack: simplify osal & control transfer, adding SAMD21/SAMD51 ports, writing porting docs, adding MIDI class support etc... +- Thanks to @cr1901 for adding STM32F4 port. +- Thanks to @PTS93 and @todbot for HID raw API diff --git a/docs/info/contributors.rst b/docs/info/contributors.rst new file mode 120000 index 00000000..b3748ccb --- /dev/null +++ b/docs/info/contributors.rst @@ -0,0 +1 @@ +../../CONTRIBUTORS.rst \ No newline at end of file diff --git a/docs/info/index.rst b/docs/info/index.rst new file mode 100644 index 00000000..fa56512b --- /dev/null +++ b/docs/info/index.rst @@ -0,0 +1,13 @@ +**** +Info +**** + +Index +===== + +.. toctree:: + :maxdepth: 2 + + uses + changelog + contributors diff --git a/docs/info/uses.rst b/docs/info/uses.rst new file mode 100644 index 00000000..f67df49f --- /dev/null +++ b/docs/info/uses.rst @@ -0,0 +1,17 @@ +**** +Uses +**** + +TinyUSB is currently used by these other projects: + +- `Adafruit nRF52 Arduino `__ +- `Adafruit nRF52 Bootloader `__ +- `Adafruit SAMD Arduino `__ +- `CircuitPython `__ +- `Espressif IDF `__ +- `MicroPython `__ +- `mynewt `__ +- `openinput `__ +- `Raspberry Pi Pico SDK `__ +- `TinyUF2 Bootloader `__ +- `TinyUSB Arduino Library `__ diff --git a/docs/concurrency.md b/docs/reference/concurrency.rst similarity index 62% rename from docs/concurrency.md rename to docs/reference/concurrency.rst index e05ca6ff..776fa4b6 100644 --- a/docs/concurrency.md +++ b/docs/reference/concurrency.rst @@ -1,36 +1,42 @@ -# Concurrency +*********** +Concurrency +*********** The TinyUSB library is designed to operate on single-core MCUs with multi-threaded applications in mind. Interaction with interrupts is especially important to pay attention to. It is compatible with optionally using a RTOS. -## General +General +------- When writing code, keep in mind that the OS (if using a RTOS) may swap out your code at any time. Also, your code can be preempted by an interrupt at any time. -## Application Code +Application Code +---------------- The USB core does not execute application callbacks while in an interrupt context. Calls to application code are from within the USB core task context. Note that the application core will call class drivers from within their own task. -## Class Drivers +Class Drivers +------------- Class driver code should never be called from an interrupt context by the USB core, though the application is allowed to call class driver functions from interrupts. USB core functions may be called simultaneously by multiple tasks. Use care that proper locking is used to guard the USBD core functions from this case. -Class drivers are allowed to call `usbd_*` functions, but not `dcd_*` functions. +Class drivers are allowed to call ``usbd_*`` functions, but not ``dcd_*`` functions. -## USB Core +USB Core +-------- -All functions that may be called from an (USB core) interrupt context have a `bool in_isr` parameter to remind the implementer that special care must be taken. +All functions that may be called from an (USB core) interrupt context have a ``bool in_isr`` parameter to remind the implementer that special care must be taken. Interrupt handlers must not directly call class driver code, they must pass a message to the USB core's task. - `usbd_*` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks. + ``usbd_*`` functions may be called from interrupts without any notice. They may also be called simultaneously by multiple tasks. -## Device Drivers +Device Drivers +-------------- Much of the processing of the USB stack is done in an interrupt context, and care must be taken in order to ensure variables are handled in the appropriate ways by the compiler and optimizer. In particular: -- Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like `_I`, `_O`, or `_IO'. -- All defined global variables are marked as `static`. - +* Ensure that all memory-mapped registers (including packet memory) are marked as volatile. GCC's optimizer will even combine memory access (like two 16-bit to be a 32-bit) if you don't mark the pointers as volatile. On some architectures, this can use macros like _I , _O , or _IO. +* All defined global variables are marked as ``static``. diff --git a/docs/reference/getting_started.rst b/docs/reference/getting_started.rst new file mode 100644 index 00000000..5f322792 --- /dev/null +++ b/docs/reference/getting_started.rst @@ -0,0 +1,153 @@ +*************** +Getting Started +*************** + +Add TinyUSB to your project +--------------------------- + +It is relatively simple to incorporate tinyusb to your (existing) project + + +* Copy or ``git submodule`` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb* +* Add all the .c in the ``tinyusb/src`` folder to your project +* Add *your_project/tinyusb/src* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. +* Make sure all required macros are all defined properly in tusb_config.h (configure file in demo application is sufficient, but you need to add a few more such as CFG_TUSB_MCU, CFG_TUSB_OS since they are passed by IDE/compiler to maintain a unique configure for all boards). +* If you use the device stack, make sure you have created/modified usb descriptors for your own need. Ultimately you need to implement all **tud descriptor** callbacks for the stack to work. +* Add tusb_init() call to your reset initialization code. +* Call ``tud_int_handler()`` (device) and/or ``tuh_int_handler()`` (host) in your USB IRQ Handler +* Implement all enabled classes's callbacks. +* If you don't use any RTOSes at all, you need to continuously and/or periodically call tud_task()/tuh_task() function. All of the callbacks and functionality are handled and invoked within the call of that task runner. + +.. code-block:: + + int main(void) + { + your_init_code(); + tusb_init(); // initialize tinyusb stack + + while(1) // the mainloop + { + your_application_code(); + + tud_task(); // device task + tuh_task(); // host task + } + } + +Examples +-------- + +For your convenience, TinyUSB contains a handful of examples for both host and device with/without RTOS to quickly test the functionality as well as demonstrate how API() should be used. Most examples will work on most of `the supported Boards `_. Firstly we need to ``git clone`` if not already + +.. code-block:: + + $ git clone https://github.com/hathach/tinyusb tinyusb + $ cd tinyusb + +Some TinyUSB examples also requires external submodule libraries in ``/lib`` such as FreeRTOS, Lightweight IP to build. Run following command to fetch them + +.. code-block:: + + $ git submodule update --init lib + +In addition, MCU driver submodule is also needed to provide low-level MCU peripheral's driver. Luckily, it will be fetched if needed when you run the ``make`` to build your board. + +Note: some examples especially those that uses Vendor class (e.g webUSB) may requires udev permission on Linux (and/or macOS) to access usb device. It depends on your OS distro, typically copy ``/examples/device/99-tinyusb.rules`` file to /etc/udev/rules.d/ then run ``sudo udevadm control --reload-rules && sudo udevadm trigger`` is good enough. + +Build +^^^^^ + +To build example, first change directory to an example folder. + +.. code-block:: + + $ cd examples/device/cdc_msc + +Then compile with ``make BOARD=[board_name] all``\ , for example + +.. code-block:: + + $ make BOARD=feather_nrf52840_express all + +Note: ``BOARD`` can be found as directory name in ``hw/bsp``\ , either in its family/boards or directly under bsp (no family). + +Port Selection +~~~~~~~~~~~~~~ + +If a board has several ports, one port is chosen by default in the individual board.mk file. Use option ``PORT=x`` To choose another port. For example to select the HS port of a STM32F746Disco board, use: + +.. code-block:: + + $ make BOARD=stm32f746disco PORT=1 all + +Port Speed +~~~~~~~~~~ + +A MCU can support multiple operational speed. By default, the example build system will use the fastest supported on the board. Use option ``SPEED=full/high`` e.g To force F723 operate at full instead of default high speed + +.. code-block:: + + $ make BOARD=stm32f746disco SPEED=full all + +Debug +^^^^^ + +To compile for debugging add ``DEBUG=1``\ , for example + +.. code-block:: + + $ make BOARD=feather_nrf52840_express DEBUG=1 all + +Log +~~~ + +Should you have an issue running example and/or submitting an bug report. You could enable TinyUSB built-in debug logging with optional ``LOG=``. LOG=1 will only print out error message, LOG=2 print more information with on-going events. LOG=3 or higher is not used yet. + +.. code-block:: + + $ make BOARD=feather_nrf52840_express LOG=2 all + +Logger +~~~~~~ + +By default log message is printed via on-board UART which is slow and take lots of CPU time comparing to USB speed. If your board support on-board/external debugger, it would be more efficient to use it for logging. There are 2 protocols: + + +* `LOGGER=rtt`: use [Segger RTT protocol](https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/) + + * Cons: requires jlink as the debugger. + * Pros: work with most if not all MCUs + * Software viewer is JLink RTT Viewer/Client/Logger which is bundled with JLink driver package. + +* ``LOGGER=swo``\ : Use dedicated SWO pin of ARM Cortex SWD debug header. + + * Cons: only work with ARM Cortex MCUs minus M0 + * Pros: should be compatible with more debugger that support SWO. + * Software viewer should be provided along with your debugger driver. + +.. code-block:: + + $ make BOARD=feather_nrf52840_express LOG=2 LOGGER=rtt all + $ make BOARD=feather_nrf52840_express LOG=2 LOGGER=swo all + +Flash +^^^^^ + +``flash`` target will use the default on-board debugger (jlink/cmsisdap/stlink/dfu) to flash the binary, please install those support software in advance. Some board use bootloader/DFU via serial which is required to pass to make command + +.. code-block:: + + $ make BOARD=feather_nrf52840_express flash + $ make SERIAL=/dev/ttyACM0 BOARD=feather_nrf52840_express flash + +Since jlink can be used with most of the boards, there is also ``flash-jlink`` target for your convenience. + +.. code-block:: + + $ make BOARD=feather_nrf52840_express flash-jlink + +Some board use uf2 bootloader for drag & drop in to mass storage device, uf2 can be generated with ``uf2`` target + +.. code-block:: + + $ make BOARD=feather_nrf52840_express all uf2 diff --git a/docs/reference/index.rst b/docs/reference/index.rst new file mode 100644 index 00000000..fcff0359 --- /dev/null +++ b/docs/reference/index.rst @@ -0,0 +1,59 @@ +********* +Reference +********* + +.. figure:: ../assets/stack.svg + :width: 1600px + :alt: stackup + + representation of the TinyUSB stack. + +Device Stack +============ + +Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported: + +- Audio Class 2.0 (UAC2) +- Bluetooth Host Controller Interface (BTH HCI) +- Communication Class (CDC) +- Device Firmware Update (DFU): DFU mode (WIP) and Runtinme +- Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ... +- Mass Storage Class (MSC): with multiple LUNs +- Musical Instrument Digital Interface (MIDI) +- Network with RNDIS, CDC-ECM (work in progress) +- USB Test and Measurement Class (USBTMC) +- Vendor-specific class support with generic In & Out endpoints. Can be used with MS OS 2.0 compatible descriptor to load winUSB driver without INF file. +- `WebUSB `__ with vendor-specific class + +If you have special need, `usbd_app_driver_get_cb()` can be used to write your own class driver without modifying the stack. Here is how RPi team add their reset interface [raspberrypi/pico-sdk#197](https://github.com/raspberrypi/pico-sdk/pull/197) + +Host Stack +========== + +- Human Interface Device (HID): Keyboard, Mouse, Generic +- Mass Storage Class (MSC) +- Hub currently only supports 1 level of hub (due to my laziness) + +OS Abstraction layer +==================== + +TinyUSB is completely thread-safe by pushing all ISR events into a central queue, then process it later in the non-ISR context task function. It also uses semaphore/mutex to access shared resources such as CDC FIFO. Therefore the stack needs to use some of OS's basic APIs. Following OSes are already supported out of the box. + +- **No OS** +- **FreeRTOS** +- **Mynewt** Due to the newt package build system, Mynewt examples are better to be on its [own repo](https://github.com/hathach/mynewt-tinyusb-example) + +License +======= + +All TinyUSB sources in the `src` folder are licensed under MIT license. However, each file can be individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project. + +Index +===== + +.. toctree:: + :maxdepth: 2 + + supported + getting_started + concurrency diff --git a/docs/reference/supported.rst b/docs/reference/supported.rst new file mode 100644 index 00000000..0028744f --- /dev/null +++ b/docs/reference/supported.rst @@ -0,0 +1,336 @@ +***************** +Supported Devices +***************** + + +Supported MCUs +============== + +.. admonition:: Warning + :class: warning + + This table is a WIP! the data is not correct, tho if a device is listed, it likely works as a usb full speed device at the least. + ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Manufacturer | Family | Device | Host | FS | HS | Known Issues | ++==============+====================+===================+====================+===================+===================+==============+ +| Dialog | DA1469x | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Espressif | ESP32-S2 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | ESP32-S3 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| MicroChip | SAMD11 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAMD21 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAMD51 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAME5x | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAMG55 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAML21 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAML22 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | SAME70,S70,V70,V71 | |:green_square:| | |:red_square:| | |:green_square:| | |:green_square:| | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| NordicSemi | nRF52833 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | nRF52840 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Nuvoton | NUC120 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | NUC121/NUC125 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | NUC126 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | NUC505 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | ++--------------+-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| NXP | iMX | RT1011 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | RT1015 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | RT1021 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | RT1052 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | RT1062 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | RT1064 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| +-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | Kinetis KL25 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| +-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | LPC | 11u | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 13 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 15 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 17 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 18 | | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 40 | | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 43 | |:green_square:| | |:yellow_square:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 51u | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 54 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | 55 | |:green_square:| | |:x:| | |:green_square:| | | | ++--------------+-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Raspberry Pi | RP2040 | |:green_square:| | |:x:| | |:green_square:| | | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Renesas | RX63N | | | | | | +| +--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | RX65N | | | | | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Silabs | EFM32GG12 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | #750 | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| Sony | CXD56 | |:green_square:| | |:x:| | |:green_square:| | |:x:| | | ++--------------+-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| ST | STM32 | L0 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F0 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F1 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F2 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F3 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F4 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | F7 | |:green_square:| | | |:green_square:| | | | +| | +------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| | | H7 | |:green_square:| | | |:green_square:| | |:green_square:| | | ++--------------+-------+------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| TI | MSP430 | |:green_square:| | | |:green_square:| | | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ +| ValentyUSB | eptri | |:green_square:| | | |:green_square:| | | | ++--------------+--------------------+-------------------+--------------------+-------------------+-------------------+--------------+ + +Table Legend +------------ + +================= =================== +|:x:| Not available +|:red_square:| Not supported +|:yellow_square:| WIP/partial support +|:green_square:| Supported +================= =================== + +Supported Boards +================ + +The board support code is only used for self-contained examples and testing. It is not used when TinyUSB is part of a larger project. It is responsible for getting the MCU started and the USB peripheral clocked with minimal of on-board devices + +- One LED : for status +- One Button : to get input from user +- One UART : optional for device, but required for host examples + +The following boards are supported (sorted alphabetically): + +Dialog DA146xx +-------------- + +- `DA14695 Development Kit – USB `__ +- `DA1469x Development Kit – Pro `__ + +Espressif ESP32-S2 +------------------ + +- Adafruit Feather ESP32-S2 +- `Adafruit Magtag 2.9" E-Ink WiFi Display `__ +- `Adafruit Metro ESP32-S2 `__ +- `ESP32-S2-Kaluga-1 `__ +- `ESP32-S2-Saola-1 `__ + +MicroChip +--------- + +SAMD11 & SAMD21 +^^^^^^^^^^^^^^^ + +- `Adafruit Circuit Playground Express `__ +- `Adafruit Feather M0 Express `__ +- `Adafruit ItsyBitsy M0 Express `__ +- `Adafruit Metro M0 Express `__ +- `Great Scott Gadgets LUNA `__ +- `Microchip SAMD11 Xplained Pro `__ +- `Microchip SAMD21 Xplained Pro `__ +- `Seeeduino Xiao `__ + +SAMD51 & SAME54 +^^^^^^^^^^^^^^^ + +- `Adafruit Feather M4 Express `__ +- `Adafruit ItsyBitsy M4 Express `__ +- `Adafruit PyBadge `__ +- `Adafruit PyPortal `__ +- `Adafruit Metro M4 Express `__ +- `D5035-01 `__ +- `Microchip SAME54 Xplained Pro `__ + +SAMG +^^^^ + +- `Microchip SAMG55 Xplained Pro `__ + +SAML2x +^^^^^^ + +- `SAML21 Xplaind Pro `__ +- `SAML22 Feather `__ +- `Sensor Watch `__ + +Nordic nRF5x +------------ + +- `Adafruit Circuit Playground Bluefruit `__ +- `Adafruit CLUE `__ +- `Adafruit Feather nRF52840 Express `__ +- `Adafruit Feather nRF52840 Sense `__ +- `Adafruit ItsyBitsy nRF52840 Express `__ +- `Arduino Nano 33 BLE `__ +- `Arduino Nano 33 BLE Sense `__ +- `Maker Diary nRF52840 MDK Dongle `__ +- `Nordic nRF52840 Development Kit (aka pca10056) `__ +- `Nordic nRF52840 Dongle (aka pca10059) `__ +- `Nordic nRF52833 Development Kit (aka pca10100) `__ +- `Raytac MDBT50Q-RX Dongle `__ + +Nuvoton +------- + +- NuTiny SDK NUC120 +- `NuTiny NUC121S `__ +- `NuTiny NUC125S `__ +- `NuTiny NUC126V `__ +- `NuTiny SDK NUC505Y `__ + +NXP +--- + +iMX RT +^^^^^^ + +- `MIMX RT1010 Evaluation Kit `__ +- `MIMX RT1015 Evaluation Kit `__ +- `MIMX RT1020 Evaluation Kit `__ +- `MIMX RT1050 Evaluation Kit `__ +- `MIMX RT1060 Evaluation Kit `__ +- `MIMX RT1064 Evaluation Kit `__ +- `Teensy 4.0 Development Board `__ + +Kinetis +^^^^^^^ + +- `FRDM-KL25Z `__ + +LPC 11-13-15 +^^^^^^^^^^^^ + +- `LPCXpresso 11u37 `__ +- `LPCXpresso 11u68 `__ +- `LPCXpresso 1347 `__ +- `LPCXpresso 1549 `__ + +LPC 17-40 +^^^^^^^^^ + +- `ARM mbed LPC1768 `__ +- `Embedded Artists LPC4088 Quick Start board `__ +- `LPCXpresso 1769 `__ + +LPC 18-43 +^^^^^^^^^ + +- `Embedded Artists LPC4357 Developer Kit `__ +- `Keil MCB1800 Evaluation Board `__ +- `LPCXpresso18S37 Development Board `__ +- `NGX LPC4330-Xplorer `__ + +LPC 51 +^^^^^^ + +- `LPCXpresso 51U68 `__ + +LPC 54 +^^^^^^ + +- `LPCXpresso 54114 `__ + +LPC55 +^^^^^ + +- `Double M33 Express `__ +- `LPCXpresso 55s28 EVK `__ +- `LPCXpresso 55s69 EVK `__ +- `MCU-Link `__ + +Renesas RX +---------- + +- `GR-CITRUS `__ +- `Renesas RX65N Target Board `__ + +Raspberry Pi RP2040 +------------------- + +- `Adafruit Feather RP2040 `__ +- `Adafruit ItsyBitsy RP2040 `__ +- `Adafruit QT Py RP2040 `__ +- `Raspberry Pi Pico `__ + +Silabs +------ + +- `EFM32GG12 Thunderboard Kit (SLTB009A) `__ + +Sony +---- + +- `Sony Spresense CXD5602 `__ + +ST STM32 +-------- + +- `Adafruit Feather STM32F405 `__ +- `Micro Python PyBoard v1.1 `__ +- `STLink-V3 Mini `__ +- `STM32 L035c8 Discovery `__ +- `STM32 L4R5zi Nucleo `__ +- `STM32 F070rb Nucleo `__ +- `STM32 F072 Evaluation `__ +- `STM32 F072rb Discovery `__ +- STM32 F103c Blue Pill +- `STM32 F207zg Nucleo `__ +- `STM32 F303vc Discovery `__ +- STM32 F401cc Black Pill +- `STM32 F407vg Discovery `__ +- `STM32 F411ce Black Pill `__ +- `STM32 F411ve Discovery `__ +- `STM32 F412zg Discovery `__ +- `STM32 F723e Discovery `__ +- `STM32 F746zg Nucleo `__ +- `STM32 F746g Discovery `__ +- `STM32 F767zi Nucleo `__ +- `STM32 F769i Discovery `__ +- `STM32 H743zi Nucleo `__ +- `STM32 H743i Evaluation `__ +- `STM32 H745i Discovery `__ +- `Waveshare OpenH743I-C `__ + +TI +-- + +- `MSP430F5529 USB LaunchPad Evaluation Kit `__ + +Tomu +---- + +- `Fomu `__ diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..e415ae03 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +sphinx~=3.0 +furo>=2020.12.30.b24 +sphinxemoji>=0.1.8 +sphinx-autodoc-typehints>=1.10 diff --git a/tinyusb.Doxyfile b/tinyusb.Doxyfile deleted file mode 100644 index 4e380f13..00000000 --- a/tinyusb.Doxyfile +++ /dev/null @@ -1,2384 +0,0 @@ -# Doxyfile 1.8.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = tinyusb - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 0.4 - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = ../../web/gh_page - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. Do not use file names with spaces, bibtex cannot handle them. See -# also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = doxygen \ - readme.markdown \ - tinyusb \ - boards \ - tests/readme.md \ - tools/readme.md \ - demos/readme.md \ - demos/device/readme.md \ - demos/host/readme.md - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.idl \ - *.ddl \ - *.odl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.cs \ - *.d \ - *.php \ - *.php4 \ - *.php5 \ - *.phtml \ - *.inc \ - *.m \ - *.markdown \ - *.md \ - *.mm \ - *.dox \ - *.py \ - *.f90 \ - *.f \ - *.for \ - *.tcl \ - *.vhd \ - *.vhdl \ - *.ucf \ - *.qsf \ - *.as \ - *.js \ - *.txt - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = readme.markdown - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more acurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = 0.4 - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = doxygen/header.html - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- -# defined cascading style sheet that is included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet file to the output directory. For an example -# see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = YES - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /