Skip to content

Commit 81d238b

Browse files
authored
Merge pull request #854 from hathach/more-housekeeping
More housekeeping
2 parents 4e2684f + 7c66c51 commit 81d238b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+155
-176
lines changed

CONTRIBUTORS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
- Improve Audio driver and add uac2_headset example
2626
- Improve STM32 Synopsys DCD with various PRs
2727

28+
- **[J McCarthy](https://github.com/xmos-jmccarthy)**
29+
- Add new DFU 1.1 class driver
30+
- Add new example for dfu
31+
2832
- **[Kamil Tomaszewski](https://github.com/kamtom480)**
2933
- Add new DCD port for **Sony CXD56** (spresnese board)
3034

@@ -53,10 +57,14 @@
5357

5458
- **[Raspberry Pi Team](https://github.com/raspberrypi)**
5559
- Add new DCD port for **Raspberry Pi RP2040**
60+
- Add new HCD port for **Raspberry Pi RP2040**
5661

5762
- **[Reinhard Panhuber](https://github.com/PanRe)**
5863
- Add new class driver for **USB Audio Class 2.0 (UAC2)**
59-
- Enhance tu_fifo with unmasked pointer, which better support DMA
64+
- Rework tu_fifo with unmasked pointer, add DMA support, and constant address support
65+
- Add new DCD/USBD edpt_xfer_fifo() API for optimizing endpoint transfer
66+
- Add and greatly improve Isochronous transfer
67+
- Add new audio examples: audio_test and audio_4_channel_mic
6068

6169
- **[Scott Shawcroft](https://github.com/tannewt)**
6270
- Add new DCD port for **SAMD21 and SAMD51**

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Supports multiple device configurations by dynamically changing usb descriptors.
7777

7878
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.
7979

80-
- **No OS** : Disabling USB IRQ is used as way to provide mutex
80+
- **No OS**
8181
- **FreeRTOS**
8282
- **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)
8383

docs/changelog.md

Lines changed: 55 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,65 @@
22

33
## WIP
44

5-
- Add new port Silabs EFM32GG12, board EFM32GG12 Thunderboard Kit (SLTB009A)
6-
- Add new port Renesas RX63N, board GR-CITRUS
7-
- MIDI
8-
- Fix MIDI buffer overflow issue
5+
- Rework tu_fifo_t with separated mutex for read and write, better support DMA with read/write buffer info. And constant address mode
6+
- Improve audio_test example and add audio_4_channel_mic example
7+
- Add new dfu example
8+
- Remove pico-sdk from submodule
9+
10+
### Device Controller Driver (DCD)
11+
12+
- Add new DCD port for Silabs EFM32GG12 with board Thunderboard Kit (SLTB009A)
13+
- Add new DCD port Renesas RX63N, board GR-CITRUS
14+
- Add new (optional) endpoint API dcd_edpt_xfer_fifo
15+
- Fix build with nRF5340
16+
- Fix build with lpc15 and lpc54
17+
- Fix build with lpc177x_8x
18+
- STM32 Synopsys: greatly improve Isochronous transfer with edpt_xfer_fifo API
19+
- Support LPC55 port1 highspeed
20+
- Add support for Espressif esp32s3
21+
- nRF: fix race condition that could cause drop packet of Bulk OUT transfer
22+
23+
### USB Device Driver (USBD)
24+
25+
- Add new (optional) endpoint ADPI usbd_edpt_xfer_fifo
26+
27+
### Device Class Driver
28+
29+
CDC
30+
31+
- [Breaking] tud_cdc_peek(), tud_vendor_peek() dropped position parameter. If needed, tu_fifo_get_read_info() can be used to peek at random offset.
32+
33+
DFU
34+
35+
- Add new DFU 1.1 class driver (WIP)
36+
37+
HID
38+
39+
- Fix keyboard report descriptor template
40+
- Add more hid keys constant from 0x6B to 0xA4
41+
- [Breaking] rename API
42+
- HID_PROTOCOL_NONE/KEYBOARD/MOUST to HID_ITF_PROTOCOL_NONE/KEYBOARD/MOUSE
43+
- tud_hid_boot_mode() to tud_hid_get_protocol()
44+
- tud_hid_boot_mode_cb() to tud_hid_set_protocol_cb()
45+
46+
MIDI
47+
48+
- Fix MIDI buffer overflow issue
49+
- [Breaking] rename API
950
- Rename tud_midi_read() to tud_midi_stream_read()
1051
- Rename tud_midi_write() to tud_midi_stream_write()
1152
- Rename tud_midi_receive() to tud_midi_packet_read()
1253
- Rename tud_midi_send() to tud_midi_packet_write()
13-
- New board stm32f072-eval
14-
- Breaking changes
15-
- tud_cdc_peek(), tud_vendor_peek() dropped position parameter. If needed, tu_fifo_get_read_info() can be used to peek
16-
at random offset.
54+
55+
### Host Controller Driver (HCD)
56+
57+
### USB Host Driver (USBH)
58+
59+
### Host Class Driver
60+
61+
HID
62+
63+
- Rework host hid driver, basically everything changes
1764

1865
## 0.9.0 - 2021.03.12
1966

src/class/audio/audio_device.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@
5555
//--------------------------------------------------------------------+
5656
// INCLUDE
5757
//--------------------------------------------------------------------+
58+
#include "device/usbd.h"
5859
#include "device/usbd_pvt.h"
60+
5961
#include "audio_device.h"
60-
//#include "common/tusb_fifo.h"
6162

6263
//--------------------------------------------------------------------+
6364
// MACRO CONSTANT TYPEDEF
@@ -548,7 +549,7 @@ static bool audiod_rx_done_cb(uint8_t rhport, audiod_function_t* audio, uint16_t
548549
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
549550
#else
550551
// Data is already placed in EP FIFO, schedule for next receive
551-
TU_VERIFY(usbd_edpt_iso_xfer(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
552+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
552553
#endif
553554

554555
#endif
@@ -852,7 +853,7 @@ static bool audiod_tx_done_cb(uint8_t rhport, audiod_function_t * audio)
852853
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_in, audio->lin_buf_in, n_bytes_tx));
853854
#else
854855
// Send everything in ISO EP FIFO
855-
TU_VERIFY(usbd_edpt_iso_xfer(rhport, audio->ep_in, &audio->ep_in_ff, n_bytes_tx));
856+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_in, &audio->ep_in_ff, n_bytes_tx));
856857
#endif
857858

858859
#endif
@@ -1611,7 +1612,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
16111612
#if USE_LINEAR_BUFFER_RX
16121613
TU_VERIFY(usbd_edpt_xfer(rhport, audio->ep_out, audio->lin_buf_out, audio->ep_out_sz), false);
16131614
#else
1614-
TU_VERIFY(usbd_edpt_iso_xfer(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
1615+
TU_VERIFY(usbd_edpt_xfer_fifo(rhport, audio->ep_out, &audio->ep_out_ff, audio->ep_out_sz), false);
16151616
#endif
16161617
}
16171618

src/class/audio/audio_device.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
#ifndef _TUSB_AUDIO_DEVICE_H_
2929
#define _TUSB_AUDIO_DEVICE_H_
3030

31-
#include "assert.h"
32-
#include "common/tusb_common.h"
33-
#include "device/usbd.h"
34-
3531
#include "audio.h"
3632

3733
//--------------------------------------------------------------------+

src/class/bth/bth_device.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
// INCLUDE
3333
//--------------------------------------------------------------------+
3434
#include "bth_device.h"
35-
#include <common/tusb_types.h>
3635
#include <device/usbd_pvt.h>
3736

3837
//--------------------------------------------------------------------+

src/class/cdc/cdc_device.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@
2828

2929
#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_CDC)
3030

31-
#include "cdc_device.h"
31+
#include "device/usbd.h"
3232
#include "device/usbd_pvt.h"
3333

34+
#include "cdc_device.h"
35+
3436
//--------------------------------------------------------------------+
3537
// MACRO CONSTANT TYPEDEF
3638
//--------------------------------------------------------------------+

src/class/cdc/cdc_device.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#define _TUSB_CDC_DEVICE_H_
2929

3030
#include "common/tusb_common.h"
31-
#include "device/usbd.h"
3231
#include "cdc.h"
3332

3433
//--------------------------------------------------------------------+

src/class/cdc/cdc_host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#if (TUSB_OPT_HOST_ENABLED && CFG_TUH_CDC)
3030

31-
#include "common/tusb_common.h"
31+
#include "host/usbh.h"
3232
#include "cdc_host.h"
3333

3434
//--------------------------------------------------------------------+

src/class/cdc/cdc_host.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
#ifndef _TUSB_CDC_HOST_H_
2828
#define _TUSB_CDC_HOST_H_
2929

30-
#include "common/tusb_common.h"
31-
#include "host/usbh.h"
3230
#include "cdc.h"
3331

3432
#ifdef __cplusplus

0 commit comments

Comments
 (0)