Dependents:   DISCOF3

Files at this revision

API Documentation at this revision

Comitter:
amarmay
Date:
Fri Dec 20 13:55:02 2019 +0000
Commit message:
LCD SSD1289

Changed in this revision

SSD1289.c Show annotated file Show diff for this revision Revisions of this file
SSD1289.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r c9164866dbb5 SSD1289.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1289.c	Fri Dec 20 13:55:02 2019 +0000
@@ -0,0 +1,97 @@
+
+
+#include "GUI.h"
+
+/*********************************************************************
+*
+*       Hardware configuration
+*
+**********************************************************************
+*/
+
+
+
+#define LCD_REG16  (*((volatile U16 *)(0x6F000000)))  /* RS = 0 */
+#define LCD_DAT16  (*((volatile U16 *)(0x6F010000)))  /* RS = 1 */
+
+/*********************************************************************
+*
+*       Exported code
+*
+*********************************************************************
+*/
+/*********************************************************************
+*
+*       LCD_X_Init
+*
+* Purpose:
+*   This routine should be called from your application program
+*   to set port pins to their initial values
+*/
+void LCD_X_Init(void) {
+	
+}
+
+
+/*********************************************************************
+*
+*       LCD_X_WriteIndex
+*
+* 
+*   
+*/
+void LCD_X_WriteIndex(U16 c) {
+  LCD_REG16 = c;
+}
+
+
+/*********************************************************************
+*
+*       LCD_X_WriteData
+*
+* 
+* 
+*/
+void LCD_X_WriteData(U16 c) {
+  LCD_DAT16 = c;
+}
+
+
+/*********************************************************************
+*
+*       LCD_X_ReadData
+*
+* Purpose:
+*   Read from controller, with A0 = 1
+*/
+U16 LCD_X_ReadData(void) {
+  return (LCD_DAT16);
+}
+
+/*********************************************************************
+*
+*       LCD_X_WriteMData
+*
+* 
+*   
+*/
+void LCD_X_WriteMData(U16 * pData, int NumWords) {
+  for (; NumWords; NumWords--) {
+    LCD_DAT16 = *pData++;
+  }
+}
+
+/*********************************************************************
+*
+*       LCD_X_ReadM01_16
+*
+* Purpose:
+*   Read multiple bytes from controller, with A0 = 1
+*/
+void LCD_X_ReadMData(U16 * pData, int NumWords) {
+  for (; NumWords; NumWords--) {
+    *pData++ = LCD_DAT16;
+  }
+}
+
+/*************************** End of file ****************************/
diff -r 000000000000 -r c9164866dbb5 SSD1289.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1289.h	Fri Dec 20 13:55:02 2019 +0000
@@ -0,0 +1,23 @@
+
+#ifndef __LCDSSD1289_H
+#define __LCDSSD1289_H
+
+
+
+
+
+#define RGB565CONVERT(red, green, blue) (int) (((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3))
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif /* __LCDSSD1289_H */