summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-03-18 00:36:28 +0700
committerGitHub <[email protected]>2020-03-18 00:36:28 +0700
commit00eabbac3533b2b33020c477b9cc07af491fd626 (patch)
tree0f5919395d326026fede20b53ba47ec77236dd69
parente47f9921570c75afd3288407601897c5b283f043 (diff)
parenta93548cfe9094893e147db0115958612e1606aa7 (diff)
Merge pull request #302 from hathach/develop
follow up to #301
-rw-r--r--.travis.yml.bck34
-rw-r--r--README.md2
-rw-r--r--examples/device/cdc_msc_freertos/src/freertos_hook.c1
-rw-r--r--examples/host/cdc_msc_hid/src/main.c1
-rw-r--r--examples/host/cdc_msc_hid/src/msc_app.c1
-rw-r--r--examples/host/cdc_msc_hid/src/tusb_config.h1
-rw-r--r--hw/bsp/board.c1
-rw-r--r--src/portable/nuvoton/nuc505/dcd_nuc505.c19
8 files changed, 11 insertions, 49 deletions
diff --git a/.travis.yml.bck b/.travis.yml.bck
deleted file mode 100644
index 2413e4225..000000000
--- a/.travis.yml.bck
+++ /dev/null
@@ -1,34 +0,0 @@
-language: c
-dist: bionic
-compiler:
- - gcc
-
-addons:
- apt:
- sources:
- - sourceline: "ppa:team-gcc-arm-embedded/ppa"
- packages:
- - python3
- - ruby
- - gcc-arm-embedded
-
-install:
- - gem install ceedling
-
-before_script:
- - wget -O /tmp/riscv-toolchain.tgz https://github.com/xpack-dev-tools/riscv-none-embed-gcc-xpack/releases/download/v8.3.0-1.1/xpack-riscv-none-embed-gcc-8.3.0-1.1-linux-x64.tgz
- - tar -xzf /tmp/riscv-toolchain.tgz
- - export PATH=$PWD/xPacks/riscv-none-embed-gcc/8.3.0-1.1/bin:$PATH
- - arm-none-eabi-gcc --version
- - riscv-none-embed-gcc --version
-
-script:
- # Build all examples
- - python3 tools/build_all.py
- # Run unit tests
- - cd test
- - ceedling test:all
- - cd ..
-
-after_success:
- - source tools/build_success.sh
diff --git a/README.md b/README.md
index 211dcc50a..19106db3e 100644
--- a/README.md
+++ b/README.md
@@ -32,13 +32,13 @@ The stack supports the following MCUs:
- **MicroChip:** SAMD21, SAMD51 (device only)
- **Nordic:** nRF52840, nRF52833
+- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505
- **NXP:**
- LPC Series: 11Uxx, 13xx, 175x_6x, 177x_8x, 18xx, 40xx, 43xx, 51Uxx, 54xxx, 55xx
- iMX RT Series: RT1011, RT1015, RT1021, RT1052, RT1062, RT1064
- **Sony:** CXD56
- **ST:** STM32 series: L0, F0, F1, F2, F3, F4, F7, H7 (device only)
- **[ValentyUSB](https://github.com/im-tomu/valentyusb)** eptri
-- **Nuvoton:** NUC120, NUC121/NUC125, NUC126, NUC505
[Here is the list of supported Boards](docs/boards.md) that can be used with provided examples.
diff --git a/examples/device/cdc_msc_freertos/src/freertos_hook.c b/examples/device/cdc_msc_freertos/src/freertos_hook.c
index 474e808a9..423bad4d3 100644
--- a/examples/device/cdc_msc_freertos/src/freertos_hook.c
+++ b/examples/device/cdc_msc_freertos/src/freertos_hook.c
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * This file is part of the TinyUSB stack.
*/
//--------------------------------------------------------------------+
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c
index 8625bbcd0..0fbbd4534 100644
--- a/examples/host/cdc_msc_hid/src/main.c
+++ b/examples/host/cdc_msc_hid/src/main.c
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * This file is part of the TinyUSB stack.
*/
#include <stdlib.h>
diff --git a/examples/host/cdc_msc_hid/src/msc_app.c b/examples/host/cdc_msc_hid/src/msc_app.c
index 3001a5f46..20ac88744 100644
--- a/examples/host/cdc_msc_hid/src/msc_app.c
+++ b/examples/host/cdc_msc_hid/src/msc_app.c
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * This file is part of the TinyUSB stack.
*/
#include "tusb.h"
diff --git a/examples/host/cdc_msc_hid/src/tusb_config.h b/examples/host/cdc_msc_hid/src/tusb_config.h
index 7c1818109..aa259dafd 100644
--- a/examples/host/cdc_msc_hid/src/tusb_config.h
+++ b/examples/host/cdc_msc_hid/src/tusb_config.h
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * This file is part of the TinyUSB stack.
*/
#ifndef _TUSB_CONFIG_H_
diff --git a/hw/bsp/board.c b/hw/bsp/board.c
index 16e713de5..7c0654346 100644
--- a/hw/bsp/board.c
+++ b/hw/bsp/board.c
@@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
- * This file is part of the TinyUSB stack.
*/
#include "board.h"
diff --git a/src/portable/nuvoton/nuc505/dcd_nuc505.c b/src/portable/nuvoton/nuc505/dcd_nuc505.c
index e05e73eff..8457e686b 100644
--- a/src/portable/nuvoton/nuc505/dcd_nuc505.c
+++ b/src/portable/nuvoton/nuc505/dcd_nuc505.c
@@ -33,12 +33,6 @@
nomenclature of EPA through EPL.
*/
-/*
- Note on OPT_MCU_NUC505_USB_DMA: the author suggests against using this option.
- The DMA functionality of the USBD peripheral does not appear to succeed with
- transfer lengths that are longer (> 64 bytes) and are not a multiple of 4.
-*/
-
#include "tusb_option.h"
#if TUSB_OPT_DEVICE_ENABLED && (CFG_TUSB_MCU == OPT_MCU_NUC505)
@@ -46,6 +40,13 @@
#include "device/dcd.h"
#include "NUC505Series.h"
+/*
+ * The DMA functionality of the USBD peripheral does not appear to succeed with
+ * transfer lengths that are longer (> 64 bytes) and are not a multiple of 4.
+ * Keep disabled for now.
+ */
+#define USE_DMA 0
+
/* rather important info unfortunately not provided by device include files */
#define USBD_BUF_SIZE 2048 /* how much USB buffer space there is */
#define USBD_MAX_DMA_LEN 0x1000 /* max bytes that can be DMAed at one time */
@@ -217,7 +218,7 @@ static void bus_reset(void)
current_dma_xfer = NULL;
}
-#ifdef OPT_MCU_NUC505_USB_DMA
+#if USE_DMA
/* this must only be called by the ISR; it does its best to share the single DMA engine across all user EPs (IN and OUT) */
static void service_dma(void)
{
@@ -473,7 +474,7 @@ void USBD_IRQHandler(void)
if (bus_state & USBD_BUSINTSTS_DMADONEIF_Msk)
{
-#ifdef OPT_MCU_NUC505_USB_DMA
+#if USE_DMA
if (current_dma_xfer)
{
current_dma_xfer->dma_requested = false;
@@ -607,7 +608,7 @@ void USBD_IRQHandler(void)
if (out_ep)
{
-#ifdef OPT_MCU_NUC505_USB_DMA
+#if USE_DMA
xfer->dma_requested = true;
service_dma();
#else