Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tinyusb to 1fe86f654fdca8a4a555737f34215582a812b481 #422

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 13 additions & 23 deletions .github/workflows/githubci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v4

- name: Run pre-commit
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1

- name: Checkout adafruit/ci-arduino
uses: actions/checkout@v4
Expand Down Expand Up @@ -60,18 +55,14 @@ jobs:
- 'metro_m4_tinyusb'

steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v4

- name: Checkout adafruit/ci-arduino
uses: actions/checkout@v4
with:
repository: adafruit/ci-arduino
ref: importable-build_platform
path: ci

- name: pre-install
Expand All @@ -83,23 +74,20 @@ jobs:
- name: test platforms
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}

build-esp32-stable:
build-esp32-v2:
if: false
runs-on: ubuntu-latest
needs: pre-commit
strategy:
fail-fast: false
matrix:
arduino-platform:
# ESP32
- 'feather_esp32s2'
- 'feather_esp32s3'
esp32-version:
- '2.0.17'

steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -113,21 +101,23 @@ jobs:
- name: pre-install
run: bash ci/actions_install.sh

- name: Install arduino-esp32 stable and Libraries
- name: Install arduino-esp32 v2 and Libraries
env:
BSP_URLS: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
run: |
arduino-cli core install esp32:esp32 --additional-urls $BSP_URLS
arduino-cli core install esp32:esp32@${{ matrix.esp32-version }} --additional-urls $BSP_URLS
arduino-cli lib install "Adafruit SPIFlash" "MIDI Library" "Adafruit seesaw Library" "Adafruit NeoPixel" "SdFat - Adafruit Fork" "SD" "Adafruit Circuit Playground" "Adafruit InternalFlash" "Pico PIO USB"
arduino-cli core list
arduino-cli lib list

- name: Create custom build script
working-directory: ${{ github.workspace }}/ci
run: |
echo 'import build_platform' > build_esp32_stable.py
echo 'build_platform.test_examples_in_folder("'${{ matrix.arduino-platform }}'")' >> build_esp32_v2.py
echo 'import build_platform' > build_esp32_v2.py
echo 'build_platform.test_examples_in_folder("'${{ matrix.arduino-platform }}'", build_platform.BUILD_DIR)' >> build_esp32_v2.py
echo 'exit(build_platform.success)' >> build_esp32_v2.py
cat build_esp32_v2.py

- name: test platforms
run: |
python3 ci/build_esp32_stable.py
python3 ci/build_esp32_v2.py
4 changes: 2 additions & 2 deletions src/class/audio/audio_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
audio->feedback.frame_shift = desc_ep->bInterval -1;

// Enable SOF interrupt if callback is implemented
if (tud_audio_feedback_interval_isr) usbd_sof_enable(rhport, true);
if (tud_audio_feedback_interval_isr) usbd_sof_enable(rhport, SOF_CONSUMER_AUDIO, true);
}
#endif
#endif // CFG_TUD_AUDIO_ENABLE_EP_OUT
Expand Down Expand Up @@ -1914,7 +1914,7 @@ static bool audiod_set_interface(uint8_t rhport, tusb_control_request_t const *
break;
}
}
if (disable) usbd_sof_enable(rhport, false);
if (disable) usbd_sof_enable(rhport, SOF_CONSUMER_AUDIO, false);
#endif

#if CFG_TUD_AUDIO_ENABLE_EP_IN && CFG_TUD_AUDIO_EP_IN_FLOW_CONTROL
Expand Down
2 changes: 2 additions & 0 deletions src/class/cdc/cdc_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ void cdcd_reset(uint8_t rhport)

tu_memclr(p_cdc, ITF_MEM_RESET_SIZE);
tu_fifo_clear(&p_cdc->rx_ff);
#if !CFG_TUD_CDC_PERSISTENT_TX_BUFF
tu_fifo_clear(&p_cdc->tx_ff);
#endif
tu_fifo_set_overwritable(&p_cdc->tx_ff, true);
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/class/cdc/cdc_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
#define CFG_TUD_CDC_EP_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64)
#endif

// By default the TX fifo buffer is cleared on connect / bus reset.
// Enable this to persist any data in the fifo instead.
#ifndef CFG_TUD_CDC_PERSISTENT_TX_BUFF
#define CFG_TUD_CDC_PERSISTENT_TX_BUFF (0)
#endif

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Loading