From 02fb18fcfd283912a21c7930bb8da4f939a01b9c Mon Sep 17 00:00:00 2001 From: e2002 Date: Mon, 7 Feb 2022 16:47:38 +0300 Subject: [PATCH] display connection --- README.md | 2 +- yoRadio/display.cpp | 12 +++--------- yoRadio/options.h | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 40881b1..d4b72a6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Three tact buttons or Encoder or all together | ------ | ------ | | GND | GND | | VIN | +5v | -| DOUT(DIN) | 22* | +| DOUT(DIN) | 27* | | BCLK | 26* | | LRC(WSEL) | 25* | diff --git a/yoRadio/display.cpp b/yoRadio/display.cpp index e12abda..25dc176 100644 --- a/yoRadio/display.cpp +++ b/yoRadio/display.cpp @@ -7,19 +7,13 @@ #include "options.h" #include "network.h" -//#define DSP_DUMMY -#define DSP_ST7735 -//#define DSP_SSD1306 - -#ifdef DSP_DUMMY +#if DSP_MODEL==0 #include "src/displays/displayDummy.h" DisplayDummy dsp; -#endif -#ifdef DSP_ST7735 +#elif DSP_MODEL==1 #include "src/displays/displayST7735.h" DisplayST7735 dsp; -#endif -#ifdef DSP_SSD1306 +#elif DSP_MODEL==2 #include "src/displays/displaySSD1306.h" DisplaySSD1306 dsp; #endif diff --git a/yoRadio/options.h b/yoRadio/options.h index 78187a7..02f059e 100644 --- a/yoRadio/options.h +++ b/yoRadio/options.h @@ -1,7 +1,14 @@ #ifndef options_h #define options_h -#define VERSION "0.4.181" +#define VERSION "0.4.182" + +/* DISPLAY MODEL + * 0 - DUMMY + * 1 - ST7735 + * 2 - SSD1306 + */ +#define DSP_MODEL 1 /* * TFT DISPLAY @@ -26,7 +33,7 @@ /* * I2S DAC */ -#define I2S_DOUT 22 // DIN connection +#define I2S_DOUT 27 // DIN connection #define I2S_BCLK 26 // BCLK Bit clock #define I2S_LRC 25 // WSEL Left Right Clock /* @@ -46,4 +53,8 @@ */ #define LED_BUILTIN 2 +#if __has_include("myoptions.h") +#include "myoptions.h" +#endif + #endif