Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ST7565 module, PlatformIO workarounds #307

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
5,761 changes: 5,761 additions & 0 deletions Esp32_radio/Esp32_radio.cpp

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions Esp32_radio/Esp32_radio.ino
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,14 @@
#define TFTFILE "/Arduino/ESP32-Radio.tft" // Binary file name for update NEXTION image
//
// Define (just one) type of display. See documentation.
#define BLUETFT // Works also for RED TFT 128x160
//#define BLUETFT // Works also for RED TFT 128x160
//#define OLED // 64x128 I2C OLED
//#define DUMMYTFT // Dummy display
//#define LCD1602I2C // LCD 1602 display with I2C backpack
//#define ILI9341 // ILI9341 240*320
//#define NEXTION // Nextion display. Uses UART 2 (pin 16 and 17)
//
#define ST7565 // ST7565 128x64 B/W COG lcd module

#include <nvs.h>
#include <PubSubClient.h>
#include <WiFiMulti.h>
Expand Down Expand Up @@ -238,7 +239,7 @@ void playtask ( void * parameter ) ; // Task to play the stream
void spftask ( void * parameter ) ; // Task for special functions
void gettime() ;
void reservepin ( int8_t rpinnr ) ;

void scan_content_length ( const char* metalinebf );

//**************************************************************************************************
// Several structs. *
Expand Down Expand Up @@ -341,7 +342,7 @@ struct keyname_t // For keys in NVS

enum display_t { T_UNDEFINED, T_BLUETFT, T_OLED, // Various types of display
T_DUMMYTFT, T_LCD1602I2C, T_ILI9341,
T_NEXTION } ;
T_NEXTION, T_ST7565} ;

enum datamode_t { INIT = 1, HEADER = 2, DATA = 4, // State for datastream
METADATA = 8, PLAYLISTINIT = 16,
Expand Down Expand Up @@ -1100,6 +1101,9 @@ VS1053* vs1053player ;
#ifdef NEXTION
#include "NEXTION.h" // For NEXTION display
#endif
#ifdef ST7565
#include "ST7565.h" // For ST7565 display
#endif


//**************************************************************************************************
Expand Down Expand Up @@ -3511,6 +3515,9 @@ void setup()
#endif
#if defined ( NEXTION )
dbgprint ( dtyp, "NEXTION" ) ;
#endif
#if defined ( ST7565 )
dbgprint ( dtyp, "ST7565" ) ;
#endif
maintask = xTaskGetCurrentTaskHandle() ; // My taskhandle
SPIsem = xSemaphoreCreateMutex(); ; // Semaphore for SPI bus
Expand Down
Loading