This commit is contained in:
e2002
2023-03-12 15:12:32 +03:00
parent 70306bfc59
commit f7d50daa00
4 changed files with 18 additions and 14 deletions

View File

@@ -1,8 +1,8 @@
#include <SPI.h>
#include <Adafruit_GFX.h>
#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;

View File

@@ -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.

View File

@@ -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=