Extended library from C12832 Lib. by Peter Drescher, Chris Styles & Mihail Stoyanov. LCD in the market such as AQM1248A (Akizuki), AD-12864-SPI (antendo), NHD-C12832 (Newhaven), ST7565 (adafruit) and so on

Dependents:   CW_Decoder_using_FFT_on_F446 LPC1114_SPI_LCD_ST7565family_test

Fork of C12832 by Components

Original library is below link.
http://mbed.org/teams/components/code/C12832/
https://mbed.org/users/dreschpe/code/C12832_lcd/

I extended applicable LCD's not only 128 x 32 but also 128 x 48 and 128 x 64 type of SPI LCD using ST7565 controller.
I have checked AD-12864-SPI and AQM1248 LCD.
/media/uploads/kenjiArai/ad-12864-spi_12.png /media/uploads/kenjiArai/aqm12848_2.png

Import programLPC1114_SPI_LCD_ST7565family_test

Controller chip is ST7565

GraphicsDisplay.h

Committer:
kenjiArai
Date:
2020-08-05
Revision:
23:233a0d635d9d
Parent:
0:4bbc531be6e2

File content as of revision 23:233a0d635d9d:

/* mbed GraphicsDisplay Display Library Base Class
 * Copyright (c) 2007-2009 sford
 * Released under the MIT License: http://mbed.org/license/mit
 *
 * A library for providing a common base class for Graphics displays
 * To port a new display, derive from this class and implement
 * the constructor (setup the display), pixel (put a pixel
 * at a location), width and height functions. Everything else
 * (locate, printf, putc, cls, window, putp, fill, blit, blitbit) 
 * will come for free. You can also provide a specialised implementation
 * of window and putp to speed up the results
 */

#ifndef MBED_GRAPHICSDISPLAY_H
#define MBED_GRAPHICSDISPLAY_H

#include "TextDisplay.h"

class GraphicsDisplay : public TextDisplay {

public:         
          
    GraphicsDisplay(const char* name);
     
    virtual void pixel(int x, int y, int colour) = 0;
    virtual int width() = 0;
    virtual int height() = 0;
        
    virtual void window(int x, int y, int w, int h);
    virtual void putp(int colour);
    
    virtual void cls();
    virtual void fill(int x, int y, int w, int h, int colour);
    virtual void blit(int x, int y, int w, int h, const int *colour);    
    virtual void blitbit(int x, int y, int w, int h, const char* colour);
    
    virtual void character(int column, int row, int value);
    virtual int columns();
    virtual int rows();
    
protected:

    // pixel location
    short _x;
    short _y;
    
    // window location
    short _x1;
    short _x2;
    short _y1;
    short _y2;

};

#endif