/* * @cond * The following section will be excluded from the documentation. */ /* ********************************************************************************************************************* PicoMite MMBasic SSD1963.h Geoff Graham, Peter Mather Copyright (c) 2021, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name MMBasic be used when referring to the interpreter in any documentation and promotional material and the original copyright message be displayed on the console at startup (additional copyright messages may be added). 4. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the . 5. Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ************************************************************************************************************************/ #ifndef _SSD1963_H #define _SSD1963_H // parameters of the display panel (refer to the glass data sheet) extern int SSD1963HorizPulseWidth, SSD1963HorizBackPorch, SSD1963HorizFrontPorch; extern int SSD1963VertPulseWidth, SSD1963VertBackPorch, SSD1963VertFrontPorch; extern int SSD1963PClock1, SSD1963PClock2, SSD1963PClock3; extern int SSD1963Mode1, SSD1963Mode2; extern int ScrollStart; // define global functions extern void InitSSD1963(void); extern void InitILI9341(void); extern void InitILI9341_8(void); extern void SetBacklightSSD1963(int intensity); extern void SetTearingCfg(int state, int mode); extern void DrawBitmapSSD1963(int x1, int y1, int width, int height, int scale, int fg, int bg, unsigned char *bitmap); extern void DrawBitmap320(int x1, int y1, int width, int height, int scale, int fg, int bg, unsigned char *bitmap); extern void DisplayPutC(char c); extern void DisplayPutS(char *); extern void DrawBufferSSD1963(int x1, int y1, int x2, int y2, unsigned char* p); extern void DrawBLITBufferSSD1963(int x1, int y1, int x2, int y2, unsigned char* p); extern void DrawBuffer320(int x1, int y1, int x2, int y2, unsigned char* p); extern void DrawBLITBuffer320(int x1, int y1, int x2, int y2, unsigned char* p); extern void ReadBufferSSD1963(int x1, int y1, int x2, int y2, unsigned char* p); extern void ReadBLITBufferSSD1963(int x1, int y1, int x2, int y2, unsigned char* p); extern void ReadBuffer320(int x1, int y1, int x2, int y2, unsigned char* p); extern void ReadBLITBuffer320(int x1, int y1, int x2, int y2, unsigned char* p); extern void DrawRectangleSSD1963(int x1, int y1, int x2, int y2, int c); extern void DrawRectangle320(int x1, int y1, int x2, int y2, int c); extern void InitDisplaySSD(void) ; extern void ConfigDisplaySSD(unsigned char *p); extern void SetAreaSSD1963(int x1, int y1, int x2, int y2); extern void SetAreaILI9341(int xstart, int ystart, int xend, int yend, int rw); extern void WriteColor(unsigned int c); extern void WriteComand(int cmd); extern void WriteData(int data); extern int display_backlight; // cursor definition extern void ShowCursor(int show); extern volatile int CursorTimer; // used to time the flashing cursor extern volatile int ClickTimer; // used to time the click when touch occurs extern volatile int TouchTimer; // used to time the response to touch extern void ScrollSSD1963(int lines); #ifdef rp2350 extern const uint8_t PINMAP[48]; #else extern const uint8_t PINMAP[30]; #endif void WriteData16bit(int data); void Write16bitCommand(int cmd) ; void SetAreaIPS_4_16(int xstart, int ystart, int xend, int yend, int rw); void WriteCmdDataIPS_4_16(int cmd,int n,int data); #define GPIO3 3 #define GPIO2 2 #define GPIO1 1 #define GPIO0 0 #define LCD_RESET (1<