Class used to interface with the Nokia N5110 LCD.

Fork of N5110 by Craig Evans

Revision:
42:596c207519de
Parent:
40:c9262294f2e1
Child:
44:42f47a8791c7
diff -r 6c046786be6c -r 596c207519de N5110.h
--- a/N5110.h	Wed Mar 08 16:13:08 2017 +0000
+++ b/N5110.h	Tue Mar 21 10:43:19 2017 +0000
@@ -86,7 +86,7 @@
         lcd.setBrightness(0.5); // put LED backlight on 50%
 
         lcd.clear();
-        // x origin, y origin, rows, cols, sprite 
+        // x origin, y origin, rows, cols, sprite
         lcd.drawSprite(20,6,8,5,(int *)sprite);
         lcd.refresh();
         wait(5.0);
@@ -126,7 +126,7 @@
             }
         }
 
-     
+
 
         // can check status of pixel using getPixel(x,y);
         lcd.clear();  // clear buffer
@@ -316,23 +316,33 @@
                    unsigned int const x,
                    unsigned int const y);
 
-    /** Set a Pixel
+    /**
+    * @brief Set a Pixel
     *
-    *   This function sets a pixel in the screen buffer.
-    *   @param  x - the x co-ordinate of the pixel (0 to 83)
-    *   @param  y - the y co-ordinate of the pixel (0 to 47)
+    * @param x     The x co-ordinate of the pixel (0 to 83)
+    * @param y     The y co-ordinate of the pixel (0 to 47)
+    * @param state The state of the pixel [true=black (default), false=white]
+    *
+    * @details This function sets the state of a pixel in the screen buffer.
+    *          The third parameter can be omitted,
     */
     void setPixel(unsigned int const x,
-                  unsigned int const y);
+                  unsigned int const y,
+                  bool const         state = true);
 
-    /** Clear a Pixel
+    /**
+    *  @brief Clear a Pixel
     *
-    *   This function clears pixel in the screen buffer
     *   @param  x - the x co-ordinate of the pixel (0 to 83)
     *   @param  y - the y co-ordinate of the pixel (0 to 47)
+    *
+    *   @details This function clears pixel in the screen buffer
+    *
+    *   @deprecated Use setPixel(x, y, false) instead
     */
     void clearPixel(unsigned int const x,
-                    unsigned int const y);
+                    unsigned int const y)
+    __attribute__((deprecated("Use setPixel(x,y,false) instead")));
 
     /** Get a Pixel
     *
@@ -426,8 +436,10 @@
                     int y0,
                     int nrows,
                     int ncols,
-                    int *sprite);
-                    
+                    int *sprite)
+    __attribute__((deprecated("Use the Bitmap::render() function instead")));
+
+
 private:
 // methods
     void setXYAddress(unsigned int const x,