From d7fa2551662236a81df149e7a8e59395f876e586 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Mon, 18 Jul 2016 21:06:45 +0300 Subject: [PATCH] Implement Teensy 2.0 USB functionality (HID, SERIAL_HID, DISK, MIDI, etc.) // Resolve #722 --- HISTORY.rst | 3 +++ docs/platforms/teensy_extra.rst | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 30a316c9..5ed2e5c9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -9,6 +9,9 @@ PlatformIO 2.0 * Added support for Pinoccio Scout board (`issue #52 `_) +* Implemented `Teensy 2.0 USB functionality `__ + (HID, SERIAL_HID, DISK, MIDI, etc.) + (`issue #722 `_) * Fixed broken LD Script for Element14 chipKIT Pi board (`issue #725 `_) diff --git a/docs/platforms/teensy_extra.rst b/docs/platforms/teensy_extra.rst index cca6c119..f2027038 100644 --- a/docs/platforms/teensy_extra.rst +++ b/docs/platforms/teensy_extra.rst @@ -9,6 +9,33 @@ See the License for the specific language governing permissions and limitations under the License. +Teensy 2.0 and USB +------------------ + +If you want to implement USB functionality using Teensy 2.0, you need to +add special macros/define using :ref:`projectconf_build_flags`: + +* ``-D USB_HID`` +* ``-D USB_SERIAL_HID`` +* ``-D USB_DISK`` +* ``-D USB_DISK_SDFLASH`` +* ``-D USB_MIDI`` +* ``-D USB_RAWHID`` +* ``-D USB_FLIGHTSIM`` +* ``-D USB_DISABLED`` + +Example: + +.. code-block:: ini + + [env:teensy_hid_device] + platform = teensy + framework = arduino + board = teensy20 + build_flags = -D USB_RAWHID + +See `Teensy USB Examples `_. + Examples --------