move usb core into Adafruit_TinyUSB_core folder

This commit is contained in:
hathach committed 2019-04-25 00:55:47 +07:00
1 parent 13b0c2e1d7
commit e02b3ff841
50 files changed
+39 -88

No files matched your search

+1 -5
View File
@@ -68,11 +68,7 @@ void suspendLoop(void);
#include "utility/AdaCallback.h"
#ifdef NRF52840_XXAA
#include "tusb.h"
#ifdef __cplusplus
#include "Adafruit_USBDevice.h"
#include "Adafruit_USBDev_CDC.h"
#endif
#include "Adafruit_TinyUSB_core.h"
#endif
// Include board variant
@@ -0,0 +1,35 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 Ha Thach for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef ADAFRUIT_TINYUSB_CORE_H_
#define ADAFRUIT_TINYUSB_CORE_H_
#include "tusb.h"
#ifdef __cplusplus
#include "Adafruit_USBDevice.h"
#include "Adafruit_USBDev_CDC.h"
#endif
#endif /* ADAFRUIT_TINYUSB_CORE_H_ */
-82
View File
@@ -1,82 +0,0 @@
# TinyUSB
[![Build Status](https://travis-ci.org/hathach/tinyusb.svg?branch=master)](https://travis-ci.org/hathach/tinyusb) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system. It is designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the stack's task function.
![tinyusb](https://user-images.githubusercontent.com/249515/49858616-f60c9700-fe27-11e8-8627-e76936352ff7.png)
```
.
├── docs # Documentation
├── examples # Sample with Makefile and Segger Embedded build support
├── hw
│   ├── bsp # Supported boards source files
│   └── mcu # Low level mcu core & peripheral drivers
├── lib # Sources from 3rd party such as freeRTOS, fatfs ...
├── src # All sources files for TinyUSB stack itself.
├── tests # Unit tests for the stack
└── tools # Files used internally
```
## Device Stack
Support multiple device configurations by dynamically changing usb descriptors. Low power functions such as suspend, resume and remote wakeup. Following device classes are supported:
- Communication Class (CDC)
- Human Interface Device (HID): Keyboard, Mouse, Gamepad etc ...
- Mass Storage Class (MSC)
- Musical Instrument Digital Interface (MIDI)
## Host Stack
**Most active development is on the Device stack. The Host stack is under rework and largely untested.**
- Human Interface Device (HID): Keyboard, Mouse, Generic
- Mass Storage Class (MSC)
- Hub currently only support 1 level of hub (due to my laziness)
## OS Abtraction layer
Currently the following OS are supported with tinyusb out of the box with a simple change of **CFG_TUSB_OS** macro.
- **No OS**
- **FreeRTOS**
- **MyNewt** (work in progress)
## Supported MCUs
The stack supports the following MCUs
- **Nordic:** nRF52840
- **NXP:** LPC11Uxx, LPC13xx, LPC175x_6x, LPC177x_8x, LPC18xx, LPC40xx, LPC43xx
- **MicroChip:** SAMD21, SAMD51
- **ST:** STM32F4
[Here is the list of supported Boards](docs/boards.md)
## Compiler & IDE
The stack is developed with GCC compiler, and should be compilable with others. Folder `examples` provide Makefile and Segger Embedded Studio build support.
## Getting Started
[Here is the details for getting started](docs/getting_started.md) with the stack.
## Porting
Want to help add TinyUSB support for a new MCU? Read [here](docs/porting.md) for an explanation on the low-level API needed by TinyUSB.
## License
MIT license for all TinyUSB sources `src` folder, [Full license is here](LICENSE). However each file is individually licensed especially those in `lib` and `hw/mcu` folder. Please make sure you understand all the license term for files you use in your project.
## Uses
TinyUSB is currently used by these other projects:
* [Adafruit nRF52 Arduino](https://github.com/adafruit/Adafruit_nRF52_Arduino)
* [Adafruit nRF52 Bootloader](https://github.com/adafruit/Adafruit_nRF52_Bootloader)
* [CircuitPython](https://github.com/adafruit/circuitpython)
If your project also uses TinyUSB and want to share, feel free to create a pull request.
@@ -25,6 +25,8 @@
#ifndef ADAFRUIT_TINYUSB_H_
#define ADAFRUIT_TINYUSB_H_
#include "tusb.h"
#include "Adafruit_USBDevice.h"
#include "Adafruit_USBDev_MSC.h"
#endif /* ADAFRUIT_TINYUSB_H_ */
+1 -1
View File
@@ -60,7 +60,7 @@ nordic.path={build.core.path}/nordic
# ARDUINO_FEATHER52 is defined for backward compatiable with other lib only
# should be replaced by ARDUINO_NRF52_ADAFRUIT in the future
compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/tinyusb/src"
compiler.nrf.flags= -DARDUINO_FEATHER52 -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES {build.sd_flags} {build.debug_flags} "-I{build.core.path}/cmsis/include" "-I{nordic.path}" "-I{nordic.path}/nrfx" "-I{nordic.path}/nrfx/hal" "-I{nordic.path}/nrfx/mdk" "-I{nordic.path}/nrfx/soc" "-I{nordic.path}/nrfx/drivers/include" "-I{nordic.path}/nrfx/drivers/src" "-I{nordic.path}/softdevice/{build.sd_name}_nrf52_{build.sd_version}_API/include" "-I{rtos.path}/Source/include" "-I{rtos.path}/config" "-I{rtos.path}/portable/GCC/nrf52" "-I{rtos.path}/portable/CMSIS/nrf52" "-I{build.core.path}/sysview/SEGGER" "-I{build.core.path}/sysview/Config" "-I{build.core.path}/usb" "-I{build.core.path}/usb/Adafruit_TinyUSB_core" "-I{build.core.path}/usb/Adafruit_TinyUSB_core/tinyusb/src"
# These can be overridden in platform.local.txt
compiler.c.extra_flags=