An mbed library for the Embedded Artists QVGA OLED 2.8 inch panel
Diff: EAQVGAOLED.h
- Revision:
- 4:cd650f08e108
- Parent:
- 3:ebd9cdd757a2
- Child:
- 5:b3f5d19945ff
--- a/EAQVGAOLED.h Tue Feb 15 20:34:42 2011 +0000 +++ b/EAQVGAOLED.h Tue Feb 15 20:42:43 2011 +0000 @@ -49,8 +49,7 @@ #define CURSOR_LEFT 3 #define CURSOR_RIGHT 4 - /** EA QVGA OLED Display driver - * + /** * @brief Uses SPI to drive the Embedded Artists 2.8" QVGA OLED panel * @author Graham Bloice * @see http://mbed.org/cookbook/EAQVGAOLED @@ -80,9 +79,10 @@ public: - // These are the functions required to support the base class - - /** Create an EA QVGA OLED object connected using + /** + * @brief The driver constructor + * + * Create an EA QVGA OLED object connected using * the specified SPI port, and two output pins; * the Chip Select pin and the Backlight pin. * @@ -95,7 +95,10 @@ */ EAQVGAOLED(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName reset, PinName bl); - /** Set a pixel to the specified colour + // These are the functions required to support the base class + + /** + * Set a pixel to the specified colour * * @ingroup API * @param x Pixel x position @@ -104,19 +107,22 @@ */ virtual void pixel(int x, int y, int colour); - /** Accessor to obtain the display width + /** + * Accessor to obtain the display width * * @return the width of the display in pixels */ virtual int width(void) { return 240; } - /** Accessor to obtain the display height + /** + * Accessor to obtain the display height * * @return the height of the display in pixels */ virtual int height(void) { return 320; } - /** Clear the screen + /** + * Clear the screen * * @ingroup API */ @@ -139,8 +145,10 @@ // These are new functions for this class - /** Draw a horizontal line + /** + * Draw a horizontal line * + * @ingroup API * @param x0 Starting x position * @param y0 Starting y position * @param x1 End x position @@ -148,8 +156,10 @@ */ void hLine(const uint16_t x0, const uint16_t y0, const uint16_t x1, const uint16_t colour); - /** Draw a vertical line + /** + * Draw a vertical line * + * @ingroup API * @param x0 Starting x position * @param y0 Starting y position * @param y1 End y position @@ -157,8 +167,10 @@ */ void vLine(const uint16_t x0, const uint16_t y0, const uint16_t y1, const uint16_t colour); - /** Draw a rectangle in the specified colour + /** + * Draw a rectangle in the specified colour * + * @ingroup API * @param x0 Starting x position * @param y0 Starting y position * @param x1 Ending x position @@ -167,8 +179,10 @@ */ void rectangle(const uint16_t x0, const uint16_t y0, const uint16_t x1, const uint16_t y1, uint16_t colour); - /** Draw a filled rectangle in the specified colour + /** + * Draw a filled rectangle in the specified colour * + * @ingroup API * @param x0 Starting x position * @param y0 Starting y position * @param x1 Ending x position @@ -177,8 +191,10 @@ */ void fillRectangle(const uint16_t x0, const uint16_t y0, const uint16_t x1, const uint16_t y1, uint16_t colour); - /** Control the backlight + /** + * Control the backlight * + * ingroup API * @param on Enable the backlight */ void backlightControl(bool on) { @@ -187,9 +203,13 @@ protected: - /** Print a character + /** + * Print a character, overridden to handle control characters * - * Overridden to handle control characters + * @ingroup API + * @param value The character value to print + * @return The character value printed + * */ virtual int _putc(int value);