Skip to content

Project-Alpaca/Adafruit_TinyUSB_ArduinoCore

 
 

Repository files navigation

Adafruit TinyUSB Core for Arduino

This repo is Arduino compatible variant from TinyUSB stack project to provide core USB functionality and CDC support for Arduino. Other class drivers such as Mass Storage, HID, MIDI etc ... are provided by Adafruit_TinyUSB_Arduino.

Porting

Currently Arduino TinyUSB is used by following cores

But it is also easy to port it to your own BSP as follows:

Add the codes

Include this repo as submodule to your BPS cores folder e.g

$ git submodule add https://github.com/adafruit/Adafruit_TinyUSB_ArduinoCore.git cores/arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore

Alternatively you could just copy the files over but will need to periodically sync to get the latest patches, features.

Write the platform dependent codes

You will need to create 2 files

  • tusb_config.h for configuration that best suites your port and
  • Adafruit_TinyUSB_port.cpp to implement platform-dependent functions
    • Adafruit_TinyUSB_Core_init() to initialize USB hardware (clock, pullups) and tinyusb stack
    • Adafruit_TinyUSB_Core_touch1200() callback that fired when IDE use touch 1200 feature to put board into DFU mode
    • Adafruit_USBD_Device getSerialDescriptor(), detach(), attach()

About

TinyUSB Core for Arduino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 92.2%
  • C++ 7.8%