From b36fb345d8649b92ee97f39b95f40758b5caa878 Mon Sep 17 00:00:00 2001 From: pschatzmann Date: Sat, 7 Dec 2024 11:48:23 +0100 Subject: [PATCH] Zephyr DRAFT --- src/AudioConfig.h | 11 +++++++++++ src/AudioTools/CoreAudio/AudioI2S/I2SNanoSenseBLE.h | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/AudioConfig.h b/src/AudioConfig.h index 9d9d098dc..a9d94aa02 100644 --- a/src/AudioConfig.h +++ b/src/AudioConfig.h @@ -769,6 +769,17 @@ using WiFiServerSecure = BearSSL::WiFiServerSecure; #ifdef ARDUINO_ARCH_ZEPHYR # define IS_ZEPHYR # define NO_INPLACE_INIT_SUPPORT +# define USE_TYPETRAITS +# define USE_I2S +# define PIN_I2S_BCK 2 +# define PIN_I2S_WS 3 +# define PIN_I2S_DATA_IN 4 +# define PIN_I2S_DATA_OUT 4 +// Default Setting: The mute pin can be switched actovated by setting it to a gpio (e.g 4). Or you could drive the LED by assigning LED_BUILTIN +# define PIN_I2S_MUTE -1 +# define SOFT_MUTE_VALUE 0 +# define USE_NANO33BLE +# define USE_ALT_PIN_SUPPORT #endif //------ VS1053 ---------- diff --git a/src/AudioTools/CoreAudio/AudioI2S/I2SNanoSenseBLE.h b/src/AudioTools/CoreAudio/AudioI2S/I2SNanoSenseBLE.h index 294e43dae..26468e388 100644 --- a/src/AudioTools/CoreAudio/AudioI2S/I2SNanoSenseBLE.h +++ b/src/AudioTools/CoreAudio/AudioI2S/I2SNanoSenseBLE.h @@ -329,7 +329,9 @@ class I2SDriverNanoBLE { LOGW("i2s_format not supported"); } } - +#ifdef IS_ZEPHYR + int digitalPinToPinName(int pin) {return pin;} +#endif /// Provides the arduino or unconverted pin name int getPinName(int pin) { #if defined(USE_ALT_PIN_SUPPORT)