Graham Bloice / EAQVGAOLED
Revision:
1:b23bfa1be0d9
Parent:
0:ae3d20db48fc
Child:
2:4babceb1bfc2
--- a/EAQVGAOLED.h	Wed Feb 09 21:23:49 2011 +0000
+++ b/EAQVGAOLED.h	Sun Feb 13 19:17:00 2011 +0000
@@ -26,22 +26,22 @@
 #include "mbed.h"
 #include "GraphicsDisplay.h"
  
-#define   BLACK			0x0000		/*   0,   0,   0 */
-#define   NAVY			0x000F      /*   0,   0, 128 */
-#define   DARK_GREEN	0x03E0      /*   0, 128,   0 */
-#define   DARK_CYAN		0x03EF      /*   0, 128, 128 */
-#define   MAROON		0x7800      /* 128,   0,   0 */
-#define   PURPLE		0x780F      /* 128,   0, 128 */
-#define   OLIVE			0x7BE0      /* 128, 128,   0 */
-#define   LIGHT_GRAY	0xC618      /* 192, 192, 192 */
-#define   DARK_GRAY		0x7BEF      /* 128, 128, 128 */
-#define   BLUE			0x001F      /*   0,   0, 255 */
-#define   GREEN			0x07E0      /*   0, 255,   0 */
+#define   BLACK            0x0000        /*   0,   0,   0 */
+#define   NAVY            0x000F      /*   0,   0, 128 */
+#define   DARK_GREEN    0x03E0      /*   0, 128,   0 */
+#define   DARK_CYAN        0x03EF      /*   0, 128, 128 */
+#define   MAROON        0x7800      /* 128,   0,   0 */
+#define   PURPLE        0x780F      /* 128,   0, 128 */
+#define   OLIVE            0x7BE0      /* 128, 128,   0 */
+#define   LIGHT_GRAY    0xC618      /* 192, 192, 192 */
+#define   DARK_GRAY        0x7BEF      /* 128, 128, 128 */
+#define   BLUE            0x001F      /*   0,   0, 255 */
+#define   GREEN            0x07E0      /*   0, 255,   0 */
 #define   CYAN          0x07FF      /*   0, 255, 255 */
 #define   RED           0xF800      /* 255,   0,   0 */
-#define   MAGENTA		0xF81F      /* 255,   0, 255 */
-#define   YELLOW		0xFFE0      /* 255, 255, 0   */
-#define   WHITE			0xFFFF      /* 255, 255, 255 */
+#define   MAGENTA        0xF81F      /* 255,   0, 255 */
+#define   YELLOW        0xFFE0      /* 255, 255, 0   */
+#define   WHITE            0xFFFF      /* 255, 255, 255 */
 
 #define   CURSOR_CLS    0
 #define   CURSOR_UP     1
@@ -51,9 +51,29 @@
 
  /** EA QVGA OLED Display driver
   *
-  * Uses SPI to drive the Embedded Artists 2.8"
-  * QVGA OLED panel
+  * @brief Uses SPI to drive the Embedded Artists 2.8" QVGA OLED panel
+  * @author Graham Bloice
+  * @see http://mbed.org/cookbook/EAQVGAOLED
+  * @see API
   *
+  * <b>EAQVGAOLED</b> defines a library to drive the Embedded Artists QVGA 2.8" OLED panel.
+  * Currently the library uses SPI to drive the panel.
+  * 
+  * Standard Example:
+  * @code
+  * #include "mbed.h"
+  * #include "EAQVGAOLED.h"
+  * int main() {
+  *
+  *     // Create an instance of the display driver
+  *     EAQVGAOLED display = EAQVGAOLED(p5, p6, p7, p8, p9, p10);
+  *  
+  *     display.background(BLACK);
+  *     display.foreground(DARK_GRAY);
+  *     display.cls();
+  *     display.printf("Hello from mbed");
+  * }
+  * @endcode  
   */ 
 class EAQVGAOLED : public GraphicsDisplay {
  
@@ -65,7 +85,9 @@
      *  the specified SPI port, and two output pins;
      *  the Chip Select pin and the Backlight pin. 
      *
-     * @param spiPort SPI port to use for data
+     * @param mosi SPI data output pin
+     * @param miso SPI data input pin
+     * @param sclk SPI Clock pin
      * @param cs Pin to drive the display CS
      * @param reset Pin to drive the display reset
      * @param bl Pin to drive the display backlight