Fork of Chris Styles' C12832 LCD driver

Dependents:   co657_lcdplay co657_nrf52_beacons door_lock co657_IoT

Fork of C12832 by Chris Styles

Files at this revision

API Documentation at this revision

Comitter:
co657_frmb
Date:
Fri Nov 27 22:45:20 2015 +0000
Parent:
21:f5ad9d768b91
Commit message:
Some updates for drawing optimisation.

Changed in this revision

C12832.h Show annotated file Show diff for this revision Revisions of this file
--- a/C12832.h	Sun Nov 15 21:44:03 2015 +0000
+++ b/C12832.h	Fri Nov 27 22:45:20 2015 +0000
@@ -280,6 +280,24 @@
       */
     void pixel_nochk (int x, int y, int colour);
 
+    /** Plots a pixel, but without bounds checking (assumed to be done elsewhere).  Fixed normal-mode. */
+    inline void pixel_nochk_norm (int x, int y, int colour)
+    {
+        if (colour == 0) {
+            buffer[x + ((y & ~7) << 4)] &= ~(1 << (y & 0x07));  // erase pixel
+        } else {
+            buffer[x + ((y & ~7) << 4)] |= (1 << (y & 0x07));   // set pixel
+        }
+    }
+    
+    /** Plots a pixel, but without bounds checking (assumed to be done elsewhere).  Fixed XOR mode. */
+    inline void pixel_nochk_xor (int x, int y, int colour)
+    {
+        if (colour == 1) {
+            buffer[x + ((y & ~7) << 4)] ^= (1 << (y & 0x07));   // xor pixel
+        }
+    }
+
 protected:
 
     /** Init the C12832 LCD controller