Add style check matching RP2040 core (#740)
Will let us backport the BackgroundAudio patches to libhelix easier and clean up some ugly formatting we've let develop.
This commit is contained in:
1 parent
62dd23a74a
commit
f9e72dbb21
434 files changed
+94604
-93082
No files matched your search
@@ -1,17 +1,20 @@
|
||||
#include <Arduino.h>
|
||||
#ifdef ESP32
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.printf("ERROR - ESP32 does not support LittleFS\n");
|
||||
}
|
||||
void loop() {}
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.printf("ERROR - ESP32 does not support LittleFS\n");
|
||||
}
|
||||
void loop() {}
|
||||
#else
|
||||
#if defined(ARDUINO_ARCH_RP2040)
|
||||
#define WIFI_OFF
|
||||
class __x { public: __x() {}; void mode() {}; };
|
||||
__x WiFi;
|
||||
#define WIFI_OFF
|
||||
class __x {
|
||||
public: __x() {};
|
||||
void mode() {};
|
||||
};
|
||||
__x WiFi;
|
||||
#else
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <ESP8266WiFi.h>
|
||||
#endif
|
||||
#include <AudioOutputI2S.h>
|
||||
#include <AudioGeneratorMIDI.h>
|
||||
@@ -22,12 +25,11 @@ AudioFileSourceLittleFS *mid;
|
||||
AudioOutputI2S *dac;
|
||||
AudioGeneratorMIDI *midi;
|
||||
|
||||
void setup()
|
||||
{
|
||||
void setup() {
|
||||
const char *soundfont = "/1mgm.sf2";
|
||||
const char *midifile = "/furelise.mid";
|
||||
|
||||
WiFi.mode(WIFI_OFF);
|
||||
WiFi.mode(WIFI_OFF);
|
||||
|
||||
Serial.begin(115200);
|
||||
Serial.println("Starting up...\n");
|
||||
@@ -35,7 +37,7 @@ void setup()
|
||||
audioLogger = &Serial;
|
||||
sf2 = new AudioFileSourceLittleFS(soundfont);
|
||||
mid = new AudioFileSourceLittleFS(midifile);
|
||||
|
||||
|
||||
dac = new AudioOutputI2S();
|
||||
midi = new AudioGeneratorMIDI();
|
||||
midi->SetSoundfont(sf2);
|
||||
@@ -44,8 +46,7 @@ void setup()
|
||||
midi->begin(mid, dac);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
void loop() {
|
||||
if (midi->isRunning()) {
|
||||
if (!midi->loop()) {
|
||||
midi->stop();
|
||||
|
||||
Reference in new issue
Block a user