add include Adafruit_TinyUSB.h to example sketches for Serial
also include Adafruit_TinyUSB.h in often used libraries
This commit is contained in:
1 parent
6a2dcbc3bf
commit
839336a1a2
40 files changed
+57
-10
No files matched your search
@@ -20,3 +20,4 @@
|
||||
# Ignore local overrides of platform.txt and boards.txt,
|
||||
/boards.local.txt
|
||||
/platform.local.txt
|
||||
/libraries/**/build/
|
||||
Submodule libraries/Adafruit_nRFCrypto updated: 50131a5834...01de30c89b.
@@ -17,6 +17,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
int ledPin = LED_RED; // LED connected to digital pin 9
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
* Note: Bluefruit nRF52832 does not support Serial1
|
||||
*/
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
const int baudrate = 115200;
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
int adcin = A5;
|
||||
int adcvalue = 0;
|
||||
float mv_per_lsb = 3600.0F/1024.0F; // 10-bit ADC with 3.6V input range
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
#if defined ARDUINO_NRF52840_CIRCUITPLAY
|
||||
#define PIN_VBAT A8 // this is just a mock read, we'll use the light sensor, so we can run the test
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
by Pierre Constantineau
|
||||
|
||||
*/
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <bluefruit.h>
|
||||
|
||||
#define WAKE_LOW_PIN PIN_A0
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
by Arturo Guadalupi
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
|
||||
// the setup function runs once when you press reset or power the board
|
||||
void setup() {
|
||||
// initialize digital pin LED_BUILTIN as an output.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/* This sketch invoke API to enter OTA dfu mode */
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
/*
|
||||
* This sketch will reset the board into Serial DFU mode
|
||||
|
||||
+1
@@ -17,6 +17,7 @@
|
||||
* to defer callback from ISR context with attachInterrupt
|
||||
*/
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
int interruptPin = A0;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
* -
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
#define SW_RXD A0
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
any redistribution
|
||||
*********************************************************************/
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
// Interval between systick event
|
||||
#define TICK_INTERVAL_MS 50
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
typedef volatile uint32_t REG32;
|
||||
#define pREG32 (REG32 *)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
|
||||
void setup()
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
// NFC pins to GPIO mode is a ONE WAY OPERATION and you will need a debugger
|
||||
// like a Segger J-Link to set them back to NFC mode!
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
while ( !Serial ) delay(10); // for nrf52840 with native usb
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
/*
|
||||
* Sketch demonstate mutli-task using Scheduler. Demo create loop2() that
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
any redistribution
|
||||
*********************************************************************/
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
/* SoftwareTimer is a helper class that uses FreeRTOS software timer
|
||||
* to invoke callback. Its periodic timing is flexible as opposed to
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// License: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
// PIN_BUZZER should be defined by the supported variant e.g CPlay Bluefruit or CLUE.
|
||||
// Otherwise please define the pin you would like to use for tone output
|
||||
|
||||
@@ -8,4 +8,4 @@ category=Communication
|
||||
url=https://github.com/adafruit/Adafruit_nRF52_Arduino
|
||||
architectures=*
|
||||
includes=bluefruit.h
|
||||
depends=Adafruit nRFCrypto
|
||||
depends=Adafruit nRFCrypto, Adafruit TinyUSB Library
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "bluefruit_common.h"
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
#define CFG_ADV_BLINKY_INTERVAL 500
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "BLEService.h"
|
||||
|
||||
// include usb hid definitions
|
||||
#include "tinyusb/src/class/hid/hid.h"
|
||||
#include "class/hid/hid.h"
|
||||
|
||||
extern const uint8_t hid_ascii_to_keycode[128][2];
|
||||
extern const uint8_t hid_keycode_to_ascii[128][2];
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <Adafruit_LittleFS.h>
|
||||
#include <InternalFileSystem.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
using namespace Adafruit_LittleFS_Namespace;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <Adafruit_LittleFS.h>
|
||||
#include <InternalFileSystem.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
using namespace Adafruit_LittleFS_Namespace;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <Adafruit_LittleFS.h>
|
||||
#include <InternalFileSystem.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
using namespace Adafruit_LittleFS_Namespace;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <Adafruit_LittleFS.h>
|
||||
#include <InternalFileSystem.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
// hardware random generator
|
||||
#include "nrf_rng.h"
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#ifndef _PDM_H_INCLUDED
|
||||
#define _PDM_H_INCLUDED
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#if !defined(ARDUINO_NRF52_ADAFRUIT)
|
||||
#error "This library targets only Adafruit NRF52840 boards"
|
||||
#endif
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "utility/PDMDoubleBuffer.h"
|
||||
|
||||
class PDMClass
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "RotaryEncoder.h"
|
||||
|
||||
#define PIN_A A0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "RotaryEncoder.h"
|
||||
|
||||
#define PIN_A A0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "RotaryEncoder.h"
|
||||
|
||||
#define PIN_A A0
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "RotaryEncoder.h"
|
||||
|
||||
#define PIN_A A0
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
#define _SPI_H_INCLUDED
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include "nrfx_spim.h"
|
||||
|
||||
// SPI_HAS_TRANSACTION means SPI has
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
http://www.arduino.cc/en/Tutorial/Knob
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <Servo.h>
|
||||
|
||||
Servo myservo; // create servo object to control a servo
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
http://www.arduino.cc/en/Tutorial/Sweep
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <Servo.h>
|
||||
|
||||
Servo myservo; // create servo object to control a servo
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <SoftwareSerial.h>
|
||||
|
||||
SoftwareSerial mySerial(A0, A1); // RX, TX
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
#include <SoftwareSerial.h>
|
||||
// software serial #1: TX = digital pin A1, RX = digital pin A0
|
||||
SoftwareSerial portOne(A0, A1);
|
||||
|
||||
@@ -25,9 +25,10 @@
|
||||
|
||||
#include "Stream.h"
|
||||
#include "variant.h"
|
||||
|
||||
#include "RingBuffer.h"
|
||||
|
||||
#include <Adafruit_TinyUSB.h> // for Serial
|
||||
|
||||
// WIRE_HAS_END means Wire has end()
|
||||
#define WIRE_HAS_END 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user