From 23b6b66f4daa128c2bfce3559a71a737868e142a Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 7 Nov 2020 23:43:39 +0700 Subject: [PATCH] release 0.7.0 with changelog and doc update --- CONTRIBUTORS.md | 134 +++++++++++++++++++++----------------- README.md | 5 +- changelog.md | 140 ++++++++++++++++++++++++++++++---------- docs/getting_started.md | 21 +++--- src/tusb_option.h | 2 +- 5 files changed, 197 insertions(+), 105 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f7d77afe33..bcd6959e99 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,63 +1,79 @@ # 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 - -* **[arturo182](https://github.com/arturo182)** - * Board support for MiMX RT1010 evaluation kit - -* **[Ha Thach](https://github.com/hathach)** - * Author and maintainer - * Most features development - -* **[Jan Dümpelmann](https://github.com/duempel)** - * Improvements to Synopsys device controller driver (DCD) for STM32 MCUs - -* **[Jeff Epler](https://github.com/jepler)** - * Improvement to MIDI device driver - -* **[Kamil Tomaszewski](https://github.com/kamtom480)** - * Sony CXD56 device driver port for spresnese board - -* **[Nathan Conrad](https://github.com/pigrew)** - * STM32 fsdev Fullspeed device driver port for STM32 L0, F0, F1, F3 etc ... - * USBTMC class driver support with example - * Various improvement e.g Zero-length packet, Lint setup - * Board support for STM32F070RB Nucleo, STM32F303 Discovery - -* **[Peter Lawrence](https://github.com/majbthrd)** - * Nuvoton NUC 120, 121, 125, 126, 505 device driver port - * USBNET RNDIS, CDC-ECM, CDC-EEM class driver - * Added `net_lwip_webserver` example for demonstration of usbnet with lwip - * Board support for NuTiny NUC120, NUC121s, NUC125s, NUC126V, NUC505 - * Complete multiple class interfaces & add cdc_dual_ports example - -* **[Scott Shawcroft](https://github.com/tannewt)** - * SAMD21 and SAMD51 device driver port - * MIDI device class driver support - * Improvement to USBD control transfer, MSC, CDC class driver - * Board support for Metro M0 & M4 express - * Write the execellent porting.md documentation - * Introduce inital Makefile - -* **[Sean Cross](https://github.com/xobs)** - * ValentyUSB eptri device driver port - * Board support for fomu - -* **[Sylvain "tnt" Munaut](https://github.com/smunaut)** - * DFU runtime support with example - -* **[Timon Skerutsch](https://github.com/PTS93)** - * hid_test.js script and extensive test for bi-directional raw HID - -* **[Tod E. Kurt](https://github.com/todbot)** - * hid_test.js script and extensive test for bi-directional raw HID - -* **[William D. Jones](https://github.com/cr1901)** - * Synopsys DesignWare device driver port for STM32 L4, F2, F4, F7, H7 etc ... - * TI MSP430 device driver port - * Board support for STM32F407 Discovery, STM32H743 Nucleo, pyboard v1.1, msp_exp430f5529lp etc ... +- **[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 + +- **[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 + +- **[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 + +- **[Reinhard Panhuber](https://github.com/PanRe)** + - Add new class driver for **USB Audio Class 2.0 (UAC2)** + - Enhance tu_fifo with unmasked pointer, which better support DMA + +- **[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 execellent 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/README.md b/README.md index 072dfc8412..372b52c186 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The stack supports the following MCUs: - **Espressif:** ESP32-S2 - **Dialog:** DA1469x -- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG (device only) +- **MicroChip:** SAMD11, SAMD21, SAMD51, SAME5x, SAMG55 - **NordicSemi:** nRF52833, nRF52840 - **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505 - **NXP:** @@ -49,7 +49,10 @@ The stack supports the following MCUs: Supports multiple device configurations by dynamically changing usb descriptors. Low power functions such like suspend, resume, and remote wakeup. Following device classes are supported: +- USB Audio Class 2.0 (UAC2) still work in progress +- Bluetooth Host Controller Interface (BTH HCI) - Communication Class (CDC) +- Device Firmware Update (DFU): only Runtinme - Human Interface Device (HID): Generic (In & Out), Keyboard, Mouse, Gamepad etc ... - Mass Storage Class (MSC): with multiple LUNs - Musical Instrument Digital Interface (MIDI) diff --git a/changelog.md b/changelog.md index a71a986f24..6b17e16662 100644 --- a/changelog.md +++ b/changelog.md @@ -1,46 +1,118 @@ # TinyUSB Changelog -## Master branch (WIP) - -### Breaking - -- TinyUSB does not directly implement USB IRQ Handler function anymore. Application must implement IRQ Handler and invoke `tud_int_handler(rhport)`. This is due to: - - IRQ Handler name can be different across system depending on the startup - - Some OS need to execute enterISR()/exitISR() to work properly, also tracing tool may need to insert trace ISR enter/exit to record usb event - - Give application full control of IRQ handler, can be useful e.g signaling there is new usb event without constant polling - -### MCU - -- Added support for Espressif ESP32-S2 and saola-1 board -- All default IRQ Handler is renamed to `dcd_int_handler()` -- STM32 Synopsys - - Bus events disconnection/suspend/resume are supported -- Added `dcd_connect()` and `dcd_disconnect()` to enable/disable internal pullup on D+/D- on supported MCUs. -- Added `dcd_edpt_close()` for STM32 FSDev - -### Device Stack - -- tud_cdc_n_write_flush() return number of bytes forced to transfer instead of bool +## 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 class driver management - - Driver detection is done by open() API +- 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 -- Improve Alternate Interface request with `SET_INTERFACE()` (not fully supported yet). -- Fixed CDC ZLP response #260 -- Remove ACM-EEM due to lack of support from host - -### Others - -- Added OPT_OS_CUMSTOM as hook for application to overwrite and/or add their own OS implementation -- Enhanced `net_lwip_webserver` example with multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both) - -## 0.6.0 - 2019.03.30 +- 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 -**MCU** +**MCUs** - Added support for Microchip SAMG55 - Added support for Nordic nRF52833 diff --git a/docs/getting_started.md b/docs/getting_started.md index 8d22a31275..06dcbd1364 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -4,14 +4,15 @@ It is relatively simple to incorporate tinyusb to your (existing) project -1. Copy or `git submodule` this repo into your project in a subfolder. Let's say it is *your_project/tinyusb* -2. Add all the .c in the src folder to your project settings (uvproj, ewp, makefile) -3. Add *your_project/tinysb* to your include path. Also make sure your current include path also contains the configuration file tusb_config.h. Or you could simply put the tusb_config.h into the tinyusb folder as well. -4. 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). -5. 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 that stack to work. -6. Add tusb_init() call to your reset initialization code. -7. Implement all enabled classes's callbacks. -8. 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 invoke within the call of that task runner. +- 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 stack) and/or `tuh_int_handler()` 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 invoke within the call of that task runner. ~~~{.c} int main(void) @@ -23,8 +24,8 @@ int main(void) { your_application_code(); - tud_task(); // tinyusb device task - tuh_task(); // tinyusb host task + tud_task(); // device task + tuh_task(); // host task } } ~~~ diff --git a/src/tusb_option.h b/src/tusb_option.h index 393940282a..2dd2b58410 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -28,7 +28,7 @@ #define _TUSB_OPTION_H_ #define TUSB_VERSION_MAJOR 0 -#define TUSB_VERSION_MINOR 5 +#define TUSB_VERSION_MINOR 7 #define TUSB_VERSION_REVISION 0 #define TUSB_VERSION_STRING TU_STRING(TUSB_VERSION_MAJOR) "." TU_STRING(TUSB_VERSION_MINOR) "." TU_STRING(TUSB_VERSION_REVISION)