fix trailing space and new line

temporarily disable codespell
This commit is contained in:
hathach 2023-03-17 16:12:49 +07:00
parent 2faad42cb1
commit 3623ba1884
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
581 changed files with 2553 additions and 2694 deletions

6
.gitattributes vendored
View File

@ -1,10 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set. # Set the default behavior, in case people don't have core.autocrlf set.
* text=auto * text=auto
*.c text *.c text
*.cpp text *.cpp text
*.h text *.h text
*.icf text *.icf text
*.js text *.js text
*.json text *.json text
*.ld text *.ld text

View File

@ -54,7 +54,7 @@ body:
Exact steps in chronological order, details should be specific e.g if you use a command/script to test with, please post it as well. Exact steps in chronological order, details should be specific e.g if you use a command/script to test with, please post it as well.
1. Go to '...' 1. Go to '...'
2. Click on '....' 2. Click on '....'
3. See error 3. See error
validations: validations:
required: true required: true
@ -63,9 +63,9 @@ body:
label: Debug Log as txt file label: Debug Log as txt file
placeholder: | placeholder: |
Attach your debug log txt file here, where the issue occurred, best with comments to explain the actual events. Attach your debug log txt file here, where the issue occurred, best with comments to explain the actual events.
Note1: Please DO NOT paste your lengthy log contents here since it hurts the readability. Note1: Please DO NOT paste your lengthy log contents here since it hurts the readability.
Note2: To enable logging, add `LOG=3` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=3` in your tusb_config.h. Note2: To enable logging, add `LOG=3` to to the make command if building with stock examples or set `CFG_TUSB_DEBUG=3` in your tusb_config.h.
More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md) More information can be found at [example's readme](https://github.com/hathach/tinyusb/blob/master/docs/getting_started.md)
validations: validations:
required: false required: false

View File

@ -43,7 +43,7 @@ jobs:
if [ -n "$(git status --porcelain)" ]; then if [ -n "$(git status --porcelain)" ]; then
git add . git add .
git commit --message "Update from https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA" git commit --message "Update from https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
git push git push
fi fi
- name: Create tinyusb_src Release - name: Create tinyusb_src Release
@ -53,7 +53,7 @@ jobs:
cd tinyusb_src cd tinyusb_src
git tag ${{ github.event.release.tag_name }} git tag ${{ github.event.release.tag_name }}
git push origin ${{ github.event.release.tag_name }} git push origin ${{ github.event.release.tag_name }}
# Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release # Send POST reqwuest to release https://docs.github.com/en/rest/reference/repos#create-a-release
bb="For release note, please checkout https://github.com/hathach/tinyusb/releases/tag/${{ github.event.release.tag_name }}" bb="For release note, please checkout https://github.com/hathach/tinyusb/releases/tag/${{ github.event.release.tag_name }}"
curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases curl -X POST -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" -H "Accept: application/vnd.github.v3+json" --data '{"tag_name": "${{ github.event.release.tag_name }}", "name": "${{ github.event.release.name }}", "body": "$bb", "draft": ${{ github.event.release.draft }}, "prerelease": ${{ github.event.release.prerelease }}}' https://api.github.com/repos/hathach/tinyusb_src/releases

View File

@ -13,11 +13,11 @@ repos:
- repo: local - repo: local
hooks: hooks:
- id: codespell #- id: codespell
name: codespell # name: codespell
entry: codespell # entry: codespell
types_or: [c, header] # types_or: [c, header]
language: system # language: system
- id: unit-test - id: unit-test
name: unit-test name: unit-test

View File

@ -15,4 +15,3 @@ python:
submodules: submodules:
include: [] include: []
recursive: false recursive: false

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View File

@ -1 +1 @@
../../CODE_OF_CONDUCT.rst ../../CODE_OF_CONDUCT.rst

View File

@ -15,7 +15,7 @@ Changelog
- Fix tu_fifo memory overflown when repeatedly write to overwritable fifo (accumulated more than 2 depths) - Fix tu_fifo memory overflown when repeatedly write to overwritable fifo (accumulated more than 2 depths)
- Better support for IAR (ARM) with ci build check for stm32 mcus. - Better support for IAR (ARM) with ci build check for stm32 mcus.
- Fix Windows build for some mingw gnu make situations - Fix Windows build for some mingw gnu make situations
Controller Driver (DCD & HCD) Controller Driver (DCD & HCD)
----------------------------- -----------------------------
@ -27,7 +27,7 @@ Controller Driver (DCD & HCD)
- Fix endpoint internal state when closed - Fix endpoint internal state when closed
- Fix reception of large ISO packets - Fix reception of large ISO packets
- [rp2040] - [rp2040]
- [dcd] Implement workaround for Errata 15. This enable SOF when bulk-in endpoint is in use and reduce its bandwidth to only 80% - [dcd] Implement workaround for Errata 15. This enable SOF when bulk-in endpoint is in use and reduce its bandwidth to only 80%
- [hcd] Fix shared irq slots filling up when hcd_init() is called multiple times - [hcd] Fix shared irq slots filling up when hcd_init() is called multiple times
@ -51,7 +51,7 @@ Device Stack
- Support port name strings - Support port name strings
- fix MS Header wTotalLength computation - fix MS Header wTotalLength computation
- [HID] - [HID]
- Add FIDO descriptor template - Add FIDO descriptor template
@ -60,7 +60,7 @@ Device Stack
- [CDC] - [CDC]
- Fix autoflush for FIFO < MPS - Fix autoflush for FIFO < MPS
- Fix tx fifo memory overflown when DTR is not set and tud_cdc_write() is called repeatedly with large enough data - Fix tx fifo memory overflown when DTR is not set and tud_cdc_write() is called repeatedly with large enough data
- [USBTMC] Fix packet size with highspeed - [USBTMC] Fix packet size with highspeed
@ -100,14 +100,14 @@ Controller Driver (DCD & HCD)
- Fix overwrite with grstctl when disable endpoint - Fix overwrite with grstctl when disable endpoint
- [EHCI] Fix an issue with EHCI driver - [EHCI] Fix an issue with EHCI driver
- [msp430] Fix for possible bug in msp430-elf-gcc 9.3.0 - [msp430] Fix for possible bug in msp430-elf-gcc 9.3.0
- [nrf5x] Fix DMA access race condition using atomic function - [nrf5x] Fix DMA access race condition using atomic function
- [pic32] Fix PIC32 santiy - [pic32] Fix PIC32 santiy
- [rp2040] - [rp2040]
- Add PICO-PIO-USB as controller (device/host) support for rp2040 - Add PICO-PIO-USB as controller (device/host) support for rp2040
- Use shared IRQ handlers, so user can also hook the USB IRQ - Use shared IRQ handlers, so user can also hook the USB IRQ
- Fix resumed signal not reported to device stack - Fix resumed signal not reported to device stack
- [stm32fsdev] Add support for stm32wb55 - [stm32fsdev] Add support for stm32wb55
Device Stack Device Stack
------------ ------------
@ -159,7 +159,7 @@ Controller Driver (DCD & HCD)
- [F1C100s] Add new DCD for Allwinner F1C100s family - [F1C100s] Add new DCD for Allwinner F1C100s family
- [PIC32MZ] Add new DCD for PIC32MZ - [PIC32MZ] Add new DCD for PIC32MZ
- [nRF] Fix/Enhance various race condition with: EASY DMA, request HFXO, EPOUT - [nRF] Fix/Enhance various race condition with: EASY DMA, request HFXO, EPOUT
- [ChipIdea] rename Transdimension to more popular ChipIdea Highspeed, - [ChipIdea] rename Transdimension to more popular ChipIdea Highspeed,
- [RP2040] various update/fix for hcd/dcd - [RP2040] various update/fix for hcd/dcd
- [FT9XX] new DCD port for Bridgetek FT90x and FT93x devices - [FT9XX] new DCD port for Bridgetek FT90x and FT93x devices
- [DA1469X] Fix resume - [DA1469X] Fix resume
@ -246,7 +246,7 @@ RP2040
^^^^^^ ^^^^^^
- Add RP2040 suspend & resume support - Add RP2040 suspend & resume support
- Implement double buffer for both host and device (#891). However device EPOUT is still single buffered due to techinical issue with short packet - Implement double buffer for both host and device (#891). However device EPOUT is still single buffered due to techinical issue with short packet
Device Stack Device Stack
------------ ------------
@ -267,7 +267,7 @@ DFU
^^^ ^^^
- Enhance DFU implementation to support multiple alternate interface and better support bwPollTimeout - Enhance DFU implementation to support multiple alternate interface and better support bwPollTimeout
- Rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU - Rename CFG_TUD_DFU_MODE to simply CFG_TUD_DFU
HID HID
^^^ ^^^
@ -287,7 +287,7 @@ UAC2
^^^^ ^^^^
- Fix bug and enhance of UAC2 - Fix bug and enhance of UAC2
Vendor Vendor
^^^^^^ ^^^^^^
@ -479,7 +479,7 @@ Host Controller Driver (HCD)
- Move echi/ohci files to portable/ - Move echi/ohci files to portable/
- Rename hcd_lpc18_43 to hcd_transdimension - Rename hcd_lpc18_43 to hcd_transdimension
- Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr() - Sub hcd API with hcd_ehci_init(), hcd_ehci_register_addr()
- Update NXP transdimention hcd_init() to reset controller to host mode - Update NXP transdimention hcd_init() to reset controller to host mode
- Ported hcd to rt10xx - Ported hcd to rt10xx
@ -529,13 +529,13 @@ Device Controller Driver
- ESP32-S2: - ESP32-S2:
- Add bus suspend and wakeup support - Add bus suspend and wakeup support
- SAMD21: - SAMD21:
- Fix (walkaround) samd21 setup_packet overflow by USB DMA - Fix (walkaround) samd21 setup_packet overflow by USB DMA
- STM32 Synopsys: - STM32 Synopsys:
- Rework USB FIFO allocation scheme and allow RX FIFO size reduction - Rework USB FIFO allocation scheme and allow RX FIFO size reduction
- Sony CXD56 - Sony CXD56
- Update Update Spresense SDK to 2.0.2 - Update Update Spresense SDK to 2.0.2
- Fix dcd issues with setup packets - Fix dcd issues with setup packets
@ -554,17 +554,17 @@ USB Device
- CDC - CDC
- Allow to transmit data, even if the host does not support control line states i.e set DTR - Allow to transmit data, even if the host does not support control line states i.e set DTR
- HID - HID
- change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64 - change default CFG_TUD_HID_EP_BUFSIZE from 16 to 64
- MIDI - MIDI
- Fix midi sysex sending bug - Fix midi sysex sending bug
- MSC - MSC
- Invoke only scsi complete callback after status transaction is complete. - Invoke only scsi complete callback after status transaction is complete.
- Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error. - Fix scsi_mode_sense6_t padding, which cause IAR compiler internal error.
- USBTMC - USBTMC
- Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu - Change interrupt endpoint example size to 8 instead of 2 for better compatibility with mcu
@ -614,20 +614,20 @@ Device Controller Driver
- Fix FIFO flush during stall - Fix FIFO flush during stall
- Implement dcd_edpt_close() API - Implement dcd_edpt_close() API
- Support F105, F107 - Support F105, F107
- Enhance STM32 fsdev - Enhance STM32 fsdev
- Improve dcd fifo allocation - Improve dcd fifo allocation
- Fix ISTR race condition - Fix ISTR race condition
- Support remap USB IRQ on supported MCUs - Support remap USB IRQ on supported MCUs
- Implement dcd_edpt_close() API - Implement dcd_edpt_close() API
- Enhance NUC 505: enhance set configure behavior - Enhance NUC 505: enhance set configure behavior
- Enhance SAMD - Enhance SAMD
- Fix race condition with setup packet - Fix race condition with setup packet
- Add SAMD11 option `OPT_MCU_SAMD11` - Add SAMD11 option `OPT_MCU_SAMD11`
- Add SAME5x option `OPT_MCU_SAME5X` - Add SAME5x option `OPT_MCU_SAME5X`
- Fix SAMG control data toggle and stall race condition - Fix SAMG control data toggle and stall race condition
- Enhance nRF - Enhance nRF
@ -659,7 +659,7 @@ USB Device
- `usbd_driver_open()` add max length argument, and return length of interface (0 for not supported). Return value is used for finding appropriate driver - `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()` - Add application implemented class driver via `usbd_app_driver_get_cb()`
- IAD is handled to assign driver id - IAD is handled to assign driver id
- Added `tud_descriptor_device_qualifier_cb()` callback - Added `tud_descriptor_device_qualifier_cb()` callback
- Optimize `tu_fifo` bulk write/read transfer - Optimize `tu_fifo` bulk write/read transfer
- Forward non-std control request to class driver - Forward non-std control request to class driver
@ -675,12 +675,12 @@ USB Device
- Send zero length packet for end of data when needed - Send zero length packet for end of data when needed
- Add `tud_cdc_tx_complete_cb()` callback - 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 - Change tud_cdc_n_write_flush() return number of bytes forced to transfer, and flush when writing enough data to fifo
- MIDI: - MIDI:
- Add packet interface - Add packet interface
- Add multiple jack descriptors - Add multiple jack descriptors
- Fix MIDI driver for sysex - Fix MIDI driver for sysex
- DFU Runtime: fix response to SET_INTERFACE and DFU_GETSTATUS request - 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 - Rename some configure macro to make it clear that those are used directly for endpoint transfer
@ -688,7 +688,7 @@ USB Device
- CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE - CFG_TUD_CDC_EPSIZE to CFG_TUD_CDC_EP_BUFSIZE
- CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE - CFG_TUD_MSC_BUFSIZE to CFG_TUD_MSC_EP_BUFSIZE
- CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE - CFG_TUD_MIDI_EPSIZE to CFG_TUD_MIDI_EP_BUFSIZE
- HID: - HID:
- Fix gamepad template descriptor - Fix gamepad template descriptor
- Add multiple HID interface API - Add multiple HID interface API
@ -700,7 +700,7 @@ USB Host
- Rework USB host stack (still work in progress) - Rework USB host stack (still work in progress)
- Fix compile error with pipehandle - Fix compile error with pipehandle
- Rework usbh control and enumeration as non-blocking - Rework usbh control and enumeration as non-blocking
- Improve Hub, MSC, HID host driver - Improve Hub, MSC, HID host driver
Examples Examples
@ -713,7 +713,7 @@ Examples
- Enhance `net_lwip_webserver` example - Enhance `net_lwip_webserver` example
- Add multiple configuration: RNDIS for Windows, CDC-ECM for macOS (Linux will work with both) - 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 - Update lwip to STABLE-2_1_2_RELEASE for net_lwip_webserver
- Added new Audio example: audio_test uac2_headsest - Added new Audio example: audio_test uac2_headsest
New Boards New Boards

View File

@ -1 +1 @@
../../CONTRIBUTORS.rst ../../CONTRIBUTORS.rst

View File

@ -44,18 +44,18 @@ For your convenience, TinyUSB contains a handful of examples for both host and d
$ git clone https://github.com/hathach/tinyusb tinyusb $ git clone https://github.com/hathach/tinyusb tinyusb
$ cd 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 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:: .. code-block::
$ git submodule update --init lib $ git submodule update --init lib
Some ports will also require a port-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples. They are out of scope for tinyusb, you should download/install it first according to its manufacturer guide. Some ports will also require a port-specific SDK (e.g. RP2040) or binary (e.g. Sony Spresense) to build examples. They are out of scope for tinyusb, you should download/install it first according to its manufacturer guide.
Build Build
^^^^^ ^^^^^
To build example, first change directory to an example folder. To build example, first change directory to an example folder.
.. code-block:: .. code-block::
@ -118,7 +118,7 @@ To compile for debugging add ``DEBUG=1``\ , for example
Log 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. 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:: .. code-block::
@ -127,7 +127,7 @@ Should you have an issue running example and/or submitting an bug report. You co
Logger 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: 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/>`_ * `LOGGER=rtt`: use `Segger RTT protocol <https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/>`_
@ -178,12 +178,12 @@ IAR Project Connection files are provided to import TinyUSB stack into your proj
* Take example of STM32F0: * Take example of STM32F0:
- You need `stm32l0xx.h`, `startup_stm32f0xx.s`, `system_stm32f0xx.c`. - You need `stm32l0xx.h`, `startup_stm32f0xx.s`, `system_stm32f0xx.c`.
- `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs. - `STM32L0xx_HAL_Driver` is only needed to run examples, TinyUSB stack itself doesn't rely on MCU's SDKs.
* Open `Tools -> Configure Custom Argument Variables` (Switch to `Global` tab if you want to do it for all your projects) * Open `Tools -> Configure Custom Argument Variables` (Switch to `Global` tab if you want to do it for all your projects)
Click `New Group ...`, name it to `TUSB`, Click `Add Variable ...`, name it to `TUSB_DIR`, change it's value to the path of your TinyUSB stack, Click `New Group ...`, name it to `TUSB`, Click `Add Variable ...`, name it to `TUSB_DIR`, change it's value to the path of your TinyUSB stack,
for example `C:\\tinyusb` for example `C:\\tinyusb`

View File

@ -1,3 +1,3 @@
mcu:SAMD11 mcu:SAMD11
mcu:SAME5X mcu:SAME5X
mcu:SAMG mcu:SAMG

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Reinhard Panhuber * Copyright (c) 2020 Reinhard Panhuber

View File

@ -31,4 +31,3 @@ if __name__ == '__main__':
plt.ylabel('Amplitude') plt.ylabel('Amplitude')
plt.title('MicNode 4 Channel') plt.title('MicNode 4 Channel')
plt.show() plt.show()

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,3 +1,3 @@
mcu:SAMD11 mcu:SAMD11
mcu:SAME5X mcu:SAME5X
mcu:SAMG mcu:SAMG

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Reinhard Panhuber * Copyright (c) 2020 Reinhard Panhuber

View File

@ -32,7 +32,6 @@ if __name__ == '__main__':
plt.ylabel('Amplitude') plt.ylabel('Amplitude')
plt.title('MicNode') plt.title('MicNode')
plt.show() plt.show()
samples = np.array(myrecording) samples = np.array(myrecording)
np.savetxt('Output.csv', samples, delimiter=",", fmt='%s') np.savetxt('Output.csv', samples, delimiter=",", fmt='%s')

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,3 +1,3 @@
mcu:SAMD11 mcu:SAMD11
mcu:SAME5X mcu:SAME5X
mcu:SAMG mcu:SAMG

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Reinhard Panhuber * Copyright (c) 2020 Reinhard Panhuber
@ -165,7 +165,7 @@ bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const * p_reque
(void)rhport; (void)rhport;
//uint8_t const itf = tu_u16_low(tu_le16toh(p_request->wIndex)); //uint8_t const itf = tu_u16_low(tu_le16toh(p_request->wIndex));
uint8_t const alt = tu_u16_low(tu_le16toh(p_request->wValue)); uint8_t const alt = tu_u16_low(tu_le16toh(p_request->wValue));
// Clear buffer when streaming format is changed // Clear buffer when streaming format is changed
if(alt != 0) if(alt != 0)
{ {
@ -257,7 +257,7 @@ bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
return false; return false;
} }
} }
// Clock Source unit // Clock Source unit
if ( entityID == UAC2_ENTITY_CLOCK ) if ( entityID == UAC2_ENTITY_CLOCK )
{ {
@ -279,7 +279,7 @@ bool tud_audio_set_req_entity_cb(uint8_t rhport, tusb_control_request_t const *
return false; return false;
} }
} }
return false; // Yet not implemented return false; // Yet not implemented
} }
@ -491,7 +491,7 @@ bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uin
pData_32[cnt] = (uint32_t)startVal++ << 16U; pData_32[cnt] = (uint32_t)startVal++ << 16U;
} }
} }
return true; return true;
} }

View File

@ -32,7 +32,6 @@ if __name__ == '__main__':
plt.ylabel('Amplitude') plt.ylabel('Amplitude')
plt.title('MicNode') plt.title('MicNode')
plt.show() plt.show()
samples = np.array(myrecording) samples = np.array(myrecording)
np.savetxt('Output.csv', samples, delimiter=",", fmt='%s') np.savetxt('Output.csv', samples, delimiter=",", fmt='%s')

View File

@ -111,7 +111,7 @@ extern "C" {
// How many formats are used, need to adjust USB descriptor if changed // How many formats are used, need to adjust USB descriptor if changed
#define CFG_TUD_AUDIO_FUNC_1_N_FORMATS 2 #define CFG_TUD_AUDIO_FUNC_1_N_FORMATS 2
// 16bit in 16bit slots // 16bit in 16bit slots
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_N_BYTES_PER_SAMPLE_TX 2 #define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_N_BYTES_PER_SAMPLE_TX 2
#define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_RESOLUTION_RX 16 #define CFG_TUD_AUDIO_FUNC_1_FORMAT_1_RESOLUTION_RX 16

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2022 HiFiPhile * Copyright (c) 2022 HiFiPhile
@ -99,4 +99,4 @@
TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED, /*_lockdelay*/ 0x0000) TUD_AUDIO_DESC_CS_AS_ISO_EP(/*_attr*/ AUDIO_CS_AS_ISO_DATA_EP_ATT_NON_MAX_PACKETS_OK, /*_ctrl*/ AUDIO_CTRL_NONE, /*_lockdelayunit*/ AUDIO_CS_AS_ISO_DATA_EP_LOCK_DELAY_UNIT_UNDEFINED, /*_lockdelay*/ 0x0000)
#endif #endif

View File

@ -2,7 +2,7 @@
idf_component_register(SRCS "main.c" idf_component_register(SRCS "main.c"
INCLUDE_DIRS "." INCLUDE_DIRS "."
REQUIRES freertos soc) REQUIRES freertos soc)
file(TO_NATIVE_PATH "${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake" board_cmake) file(TO_NATIVE_PATH "${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake" board_cmake)
if(EXISTS ${board_cmake}) if(EXISTS ${board_cmake})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1 +1 @@
mcu:SAMD11 mcu:SAMD11

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1 +1 @@
mcu:SAMD11 mcu:SAMD11

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -8,7 +8,7 @@ INC += \
EXAMPLE_SOURCE = \ EXAMPLE_SOURCE = \
src/main.c \ src/main.c \
src/usb_descriptors.c src/usb_descriptors.c
SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE))
include ../../rules.mk include ../../rules.mk

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -48,7 +48,7 @@ if( deviceInfo ) {
function anySupportedBoard(d) { function anySupportedBoard(d) {
for (var key in boards) { for (var key in boards) {
if (boards.hasOwnProperty(key)) { if (boards.hasOwnProperty(key)) {
if (isDevice(boards[key],d)) { if (isDevice(boards[key],d)) {
@ -65,4 +65,3 @@ function isDevice(board,d){
// product id 0xff is matches all // product id 0xff is matches all
return d.vendorId==board[0] && (d.productId==board[1] || board[1] == 0xFFFF); return d.vendorId==board[0] && (d.productId==board[1] || board[1] == 0xFFFF);
} }

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,2 +1,2 @@
mcu:SAMD11 mcu:SAMD11
mcu:MKL25ZXX mcu:MKL25ZXX

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -80,4 +80,4 @@ if (EXISTS ${TOP}/lib/lwip/src)
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})
endif() endif()

View File

@ -7,4 +7,4 @@ mcu:STM32L0
mcu:MKL25ZXX mcu:MKL25ZXX
family:broadcom_64bit family:broadcom_64bit
family:broadcom_32bit family:broadcom_32bit
board:curiosity_nano board:curiosity_nano

View File

@ -1,8 +1,8 @@
/* /*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science. * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE. * OF SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Adam Dunkels <adam@sics.se> * Author: Adam Dunkels <adam@sics.se>
* *
*/ */
@ -42,7 +42,7 @@ typedef int sys_prot_t;
#if defined (__ICCARM__) #if defined (__ICCARM__)
#define PACK_STRUCT_BEGIN #define PACK_STRUCT_BEGIN
#define PACK_STRUCT_STRUCT #define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END #define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_USE_INCLUDES #define PACK_STRUCT_USE_INCLUDES
@ -50,7 +50,7 @@ typedef int sys_prot_t;
#elif defined (__CC_ARM) #elif defined (__CC_ARM)
#define PACK_STRUCT_BEGIN __packed #define PACK_STRUCT_BEGIN __packed
#define PACK_STRUCT_STRUCT #define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END #define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_FIELD(x) x

View File

@ -1,8 +1,8 @@
/* /*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science. * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without modification, * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met: * are permitted provided that the following conditions are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
@ -11,21 +11,21 @@
* this list of conditions and the following disclaimer in the documentation * this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution. * and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission. * derived from this software without specific prior written permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE. * OF SUCH DAMAGE.
* *
* This file is part of the lwIP TCP/IP stack. * This file is part of the lwIP TCP/IP stack.
* *
* Author: Simon Goldschmidt * Author: Simon Goldschmidt
* *
*/ */

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Peter Lawrence * Copyright (c) 2020 Peter Lawrence
@ -39,7 +39,7 @@ and likely their manufacturer has not tested such functionality. Some code work
The smartphone may only have an ECM driver, but refuse to automatically pick ECM (unlike the OSes above); The smartphone may only have an ECM driver, but refuse to automatically pick ECM (unlike the OSes above);
try modifying ./examples/devices/net_lwip_webserver/usb_descriptors.c so that CONFIG_ID_ECM is default. try modifying ./examples/devices/net_lwip_webserver/usb_descriptors.c so that CONFIG_ID_ECM is default.
The smartphone may be artificially picky about which Ethernet MAC address to recognize; if this happens, The smartphone may be artificially picky about which Ethernet MAC address to recognize; if this happens,
try changing the first byte of tud_network_mac_address[] below from 0x02 to 0x00 (clearing bit 1). try changing the first byte of tud_network_mac_address[] below from 0x02 to 0x00 (clearing bit 1).
*/ */
@ -170,7 +170,7 @@ bool dns_query_proc(const char *name, ip4_addr_t *addr)
bool tud_network_recv_cb(const uint8_t *src, uint16_t size) bool tud_network_recv_cb(const uint8_t *src, uint16_t size)
{ {
/* this shouldn't happen, but if we get another packet before /* this shouldn't happen, but if we get another packet before
parsing the previous, we must signal our inability to accept it */ parsing the previous, we must signal our inability to accept it */
if (received_frame) return false; if (received_frame) return false;

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)
@ -77,7 +77,7 @@ tusb_desc_device_t const desc_device =
.bDeviceClass = TUSB_CLASS_MISC, .bDeviceClass = TUSB_CLASS_MISC,
.bDeviceSubClass = MISC_SUBCLASS_COMMON, .bDeviceSubClass = MISC_SUBCLASS_COMMON,
.bDeviceProtocol = MISC_PROTOCOL_IAD, .bDeviceProtocol = MISC_PROTOCOL_IAD,
.bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE, .bMaxPacketSize0 = CFG_TUD_ENDPOINT0_SIZE,
.idVendor = 0xCafe, .idVendor = 0xCafe,

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Jerzy Kasenberg * Copyright (c) 2020 Jerzy Kasenberg
@ -176,7 +176,7 @@ static bool tud_audio_clock_get_request(uint8_t rhport, audio_control_request_t
rangef.subrange[i].bRes = 0; rangef.subrange[i].bRes = 0;
TU_LOG1("Range %d (%d, %d, %d)\r\n", i, (int)rangef.subrange[i].bMin, (int)rangef.subrange[i].bMax, (int)rangef.subrange[i].bRes); TU_LOG1("Range %d (%d, %d, %d)\r\n", i, (int)rangef.subrange[i].bMin, (int)rangef.subrange[i].bMax, (int)rangef.subrange[i].bRes);
} }
return tud_audio_buffer_and_schedule_control_xfer(rhport, (tusb_control_request_t const *)request, &rangef, sizeof(rangef)); return tud_audio_buffer_and_schedule_control_xfer(rhport, (tusb_control_request_t const *)request, &rangef, sizeof(rangef));
} }
} }

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Ha Thach (tinyusb.org) * Copyright (c) 2020 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Jerzy Kasenbreg * Copyright (c) 2020 Jerzy Kasenbreg

View File

@ -26,4 +26,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -36,8 +36,8 @@ def test_trig():
time.sleep(0.3) # SRQ may have some delay time.sleep(0.3) # SRQ may have some delay
assert (inst.read_stb() & 0x40), "SRQ not set after 0.3 seconds" assert (inst.read_stb() & 0x40), "SRQ not set after 0.3 seconds"
assert (inst.read_stb() == 0) assert (inst.read_stb() == 0)
def test_mav(): def test_mav():
inst.write("delay 50") inst.write("delay 50")
inst.read_stb() # clear STB inst.read_stb() # clear STB
@ -45,15 +45,15 @@ def test_mav():
inst.write("123") inst.write("123")
time.sleep(0.3) time.sleep(0.3)
assert (inst.read_stb() & 0x10), "MAV not set after 0.5 seconds" assert (inst.read_stb() & 0x10), "MAV not set after 0.5 seconds"
rsp = inst.read() rsp = inst.read()
assert(rsp == "123\r\n") assert(rsp == "123\r\n")
def test_srq(): def test_srq():
assert (inst.read_stb() == 0) assert (inst.read_stb() == 0)
inst.write("123") inst.write("123")
#inst.enable_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE) #inst.enable_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE)
#waitrsp = inst.wait_on_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, 5000) #waitrsp = inst.wait_on_event(pyvisa.constants.VI_EVENT_SERVICE_REQ, 5000)
#inst.discard_events(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE) #inst.discard_events(pyvisa.constants.VI_EVENT_SERVICE_REQ, pyvisa.constants.VI_QUEUE)
@ -64,7 +64,7 @@ def test_srq():
assert (stb == 0x50),msg assert (stb == 0x50),msg
assert (inst.read_stb() == 0x10), "SRQ set at second read!" assert (inst.read_stb() == 0x10), "SRQ set at second read!"
rsp = inst.read() rsp = inst.read()
assert(rsp == "123\r\n") assert(rsp == "123\r\n")
@ -110,7 +110,7 @@ def test_abort_in():
inst.timeout = 800 inst.timeout = 800
y = inst.read() y = inst.read()
assert(y == "xxx\r\n") assert(y == "xxx\r\n")
def test_indicate(): def test_indicate():
# perform indicator pulse # perform indicator pulse
usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM) usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM)
@ -120,8 +120,8 @@ def test_indicate():
assert(retv == b'\x01') assert(retv == b'\x01')
else: else:
assert((retv[1] == pyvisa.constants.StatusCode(0)) and (retv[0] == b'\x01')), f"indicator pulse failed: retv={retv}" assert((retv[1] == pyvisa.constants.StatusCode(0)) and (retv[0] == b'\x01')), f"indicator pulse failed: retv={retv}"
def test_multi_read(): def test_multi_read():
old_chunk_size = inst.chunk_size old_chunk_size = inst.chunk_size
longstr = "0123456789abcdefghijklmnopqrstuvwxyz" * 10 longstr = "0123456789abcdefghijklmnopqrstuvwxyz" * 10
@ -133,7 +133,7 @@ def test_multi_read():
y = inst.read() y = inst.read()
assert (x + "\r\n" == y) assert (x + "\r\n" == y)
#inst.chunk_size = old_chunk_size #inst.chunk_size = old_chunk_size
def test_stall_ep0(): def test_stall_ep0():
usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM) usb_iface = inst.get_visa_attribute(pyvisa.constants.VI_ATTR_USB_INTFC_NUM)
inst.read_stb() inst.read_stb()
@ -143,7 +143,7 @@ def test_stall_ep0():
assert(False) assert(False)
except pyvisa.VisaIOError: except pyvisa.VisaIOError:
pass pass
assert (inst.read_stb() == 0) assert (inst.read_stb() == 0)
@ -153,7 +153,7 @@ print(reslist)
if (len(reslist) == 0): if (len(reslist) == 0):
sys.exit() sys.exit()
inst = rm.open_resource(reslist[0]); inst = rm.open_resource(reslist[0]);
inst.timeout = 3000 inst.timeout = 3000

View File

@ -31,4 +31,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2020 Jerzy Kasenbreg * Copyright (c) 2020 Jerzy Kasenbreg

View File

@ -25,4 +25,4 @@ target_include_directories(${PROJECT} PUBLIC
# Configure compilation flags and libraries for the example... see the corresponding function # Configure compilation flags and libraries for the example... see the corresponding function
# in hw/bsp/FAMILY/family.cmake for details. # in hw/bsp/FAMILY/family.cmake for details.
family_configure_device_example(${PROJECT}) family_configure_device_example(${PROJECT})

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)
@ -68,4 +68,3 @@ void tuh_msc_umount_cb(uint8_t dev_addr)
(void) dev_addr; (void) dev_addr;
printf("A MassStorage device is unmounted\r\n"); printf("A MassStorage device is unmounted\r\n");
} }

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

View File

@ -1,4 +1,4 @@
/* /*
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Ha Thach (tinyusb.org) * Copyright (c) 2019 Ha Thach (tinyusb.org)

Some files were not shown because too many files have changed in this diff Show More