diff --git a/README.md b/README.md index 2d5f36a..755b984 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ https://aliexpress.com/item/32965676064.html - or **ILI9488** 3.5' 480x320 SPI https://aliexpress.com/item/1005001999296476.html?sku_id=12000018365356570 - or **ILI9486** (Testing mode) 3.5' 480x320 SPI https://aliexpress.com/item/1005001999296476.html?sku_id=12000018365356568 - or **SSD1322** 2.8' 256x64 SPI https://aliexpress.com/item/1005003480981568.html +- or **ST7920** 2.6' 128x64 SPI https://aliexpress.com/item/32699482638.html (see [Wiki](https://github.com/e2002/yoradio/wiki/Available-display-models) for more details) @@ -225,6 +226,9 @@ Work is in progress... --- ## Version history +#### v0.9.058 +- added support for ST7920 128x64 2.6' OLED display https://aliexpress.com/item/32699482638.html + #### v0.9.045 - added support for SSD1322 256x64 2.8' OLED display https://aliexpress.com/item/1005003480981568.html diff --git a/yoRadio/src/ST7920/ST7920.h b/yoRadio/src/ST7920/ST7920.h index ae3496b..8a71394 100644 --- a/yoRadio/src/ST7920/ST7920.h +++ b/yoRadio/src/ST7920/ST7920.h @@ -1,8 +1,8 @@ #include #include -#define ST7920_HEIGHT 64 //64 pixels tall display -#define ST7920_WIDTH 128 //128 pixels wide display +#define ST7920_HEIGHT 64 //64 pixels tall display +#define ST7920_WIDTH 128 //128 pixels wide display #define ST7920_DISPLAYOFF 0x08 @@ -10,22 +10,22 @@ //#define ST7920_NORMALDISPLAY 0xA6 //#define ST7920_INVERSEDISPLAY 0xA7 -#define BLACK 0 //Defines color - Black color -> Bit in buffer is set to one -#define WHITE 1 //Defines color - White color -> Bit in buffer is set to zero +#define BLACK 0 //Defines color - Black color -> Bit in buffer is set to one +#define WHITE 1 //Defines color - White color -> Bit in buffer is set to zero class ST7920 : public Adafruit_GFX { public: - //ST7920(int8_t CS); + //ST7920(int8_t CS); ST7920(SPIClass *spi, int8_t cs_pin, uint32_t bitrate=8000000UL); ~ST7920(void); - void begin(void); - void clearDisplay(void); - void invertDisplay(bool flag); - void doSleep(bool flag); - void display(); - void drawPixel(int16_t x, int16_t y, uint16_t color); + void begin(void); + void clearDisplay(void); + void invertDisplay(bool flag); + void doSleep(bool flag); + void display(); + void drawPixel(int16_t x, int16_t y, uint16_t color); void ST7920Data(uint8_t data); - void ST7920Command(uint8_t data); + void ST7920Command(uint8_t data); private: SPIClass *spi; uint8_t *buffer; diff --git a/yoRadio/src/core/options.h b/yoRadio/src/core/options.h index c998c2a..2006612 100644 --- a/yoRadio/src/core/options.h +++ b/yoRadio/src/core/options.h @@ -1,7 +1,7 @@ #ifndef options_h #define options_h -#define YOVERSION "0.9.057" +#define YOVERSION "0.9.058" /******************************************************* DO NOT EDIT THIS FILE. diff --git a/yoRadio/src/displays/displayST7920.cpp b/yoRadio/src/displays/displayST7920.cpp index 2d38b14..1722319 100644 --- a/yoRadio/src/displays/displayST7920.cpp +++ b/yoRadio/src/displays/displayST7920.cpp @@ -10,7 +10,7 @@ #define LOGO_HEIGHT 32 #ifndef DEF_SPI_FREQ - #define DEF_SPI_FREQ 8000000UL /* set it to 0 for system default */ + #define DEF_SPI_FREQ 8000000UL #endif const unsigned char logo [] PROGMEM=