Newhaven 320x240 LCD

Dependencies:   mbed

Revision:
4:aa6dc362b462
Parent:
2:2058e2f79157
--- a/newhaven.h	Sun Feb 27 23:30:14 2011 +0000
+++ b/newhaven.h	Mon Feb 28 17:48:12 2011 +0000
@@ -67,14 +67,37 @@
          *
          * @param row the row of the pixel
          * @param col the column of the pixel
+         * @param color 1 = on, 0 = off
          */
-        void setPixel(int row, int col);
+        void setPixel(int row, int col, int color);
+        
+        /* draws a line on the LCD
+         *
+         * @param r1 the row of the first endpoint
+         * @param c1 the column of the first endpoint
+         * @param r2 the row of the second endpoint
+         * @param c2 the column of the second endpoint
+         * @param color 1 = on, 0 = off
+         */
+        void drawLine(int r1, int c1, int r2, int c2, int color);
+        
+        /* draws and fills a rectangle on the LCD
+         *
+         * @param row the row of the top-left pixel
+         * @param col the column of the top-left pixel
+         * @param width the width of the rectangle
+         * @param height the height of the rectangle
+         * @param color 1 = on, 0 = off
+         */
+        void fillRect(int row, int col, int width, int height, int color);
         
     private:
         DigitalOut E,RW,A0,CS,RST;   
-        BusInOut *LCD_PORT;   
+        BusInOut *LCD_PORT;
+        unsigned char screenBuffer[240*40];   
         
 };
 
 void delay(unsigned int n);
 void delay1(unsigned int n);
+void swap(int* a, int* b);