Download libraries/Robot_Control/src/Arduino_LCD.h from Beifengdo/Arduino-Development: direct link, hf CLI and curl.
- Browser
- Download file 4.31 kB
-
https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/bc1a836d1a2b92a7ba9b6c2f7fe56ee9b179d581/libraries/Robot_Control/src/Arduino_LCD.h
- Command line
-
hf download hf://datasets/Beifengdo/Arduino-Development@bc1a836d1a2b92a7ba9b6c2f7fe56ee9b179d581/libraries/Robot_Control/src/Arduino_LCD.h
-
curl -L -o Arduino_LCD.h https://huggingface.co/datasets/Beifengdo/Arduino-Development/resolve/bc1a836d1a2b92a7ba9b6c2f7fe56ee9b179d581/libraries/Robot_Control/src/Arduino_LCD.h
4.31 kB
| /*************************************************** | |
| This is a library for the Adafruit 1.8" SPI display. | |
| This library works with the Adafruit 1.8" TFT Breakout w/SD card | |
| ----> http://www.adafruit.com/products/358 | |
| as well as Adafruit raw 1.8" TFT display | |
| ----> http://www.adafruit.com/products/618 | |
| Check out the links above for our tutorials and wiring diagrams | |
| These displays use SPI to communicate, 4 or 5 pins are required to | |
| interface (RST is optional) | |
| Adafruit invests time and resources providing this open source code, | |
| please support Adafruit and open-source hardware by purchasing | |
| products from Adafruit! | |
| Written by Limor Fried/Ladyada for Adafruit Industries. | |
| MIT license, all text above must be included in any redistribution | |
| ****************************************************/ | |
| //#include <avr/pgmspace.h> | |
| // some flags for initR() :( | |
| // Color definitions | |
| class Arduino_LCD : public Adafruit_GFX { | |
| public: | |
| Arduino_LCD(uint8_t CS, uint8_t RS, uint8_t SID, uint8_t SCLK, uint8_t RST); | |
| Arduino_LCD(uint8_t CS, uint8_t RS, uint8_t RST); | |
| void initB(void), // for ST7735B displays | |
| initR(uint8_t options = INITR_GREENTAB), // for ST7735R | |
| setAddrWindow(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1), | |
| pushColor(uint16_t color), | |
| fillScreen(uint16_t color), | |
| drawPixel(int16_t x, int16_t y, uint16_t color), | |
| drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color), | |
| drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color), | |
| fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color), | |
| setRotation(uint8_t r), | |
| invertDisplay(boolean i); | |
| uint16_t Color565(uint8_t r, uint8_t g, uint8_t b); | |
| /* These are not for current use, 8-bit protocol only! | |
| uint8_t readdata(void), | |
| readcommand8(uint8_t); | |
| uint16_t readcommand16(uint8_t); | |
| uint32_t readcommand32(uint8_t); | |
| void dummyclock(void); | |
| */ | |
| private: | |
| void spiwrite(uint8_t), | |
| writecommand(uint8_t c), | |
| writedata(uint8_t d), | |
| // commandList(prog_uchar *addr), | |
| // commonInit(prog_uchar *cmdList); | |
| commandList(uint8_t *addr), | |
| commonInit(uint8_t *cmdList); | |
| //uint8_t spiread(void); | |
| boolean hwSPI; | |
| volatile uint8_t *dataport, *clkport, *csport, *rsport; | |
| uint8_t _cs, _rs, _rst, _sid, _sclk, | |
| datapinmask, clkpinmask, cspinmask, rspinmask, | |
| colstart, rowstart; // some displays need this changed | |
| }; | |