Fork of SSD1289 lib for Landtiger board

ssd1289.h

Committer:
ttodorov
Date:
2012-11-21
Revision:
0:d7202c9fc5db
Child:
1:f4f77e6729cd

File content as of revision 0:d7202c9fc5db:

#ifndef SSD1286_H
#define SSD1289_H

#include "mbed.h"

typedef enum
{
    PORTRAIT = 0,
    LANDSCAPE = 1,
} orientation_t;

typedef struct
{
    unsigned char* font;
    unsigned char width;
    unsigned char height;
    unsigned char offset;
    unsigned char numchars;
} font_metrics_t;

class SSD1289 : public Stream
{
public:
    SSD1289( PinName CS_PIN, PinName RESET_PIN, PinName RS_PIN, PinName WR_PIN, PinName RD_PIN, BusOut* DATA_PORT );
    void Initialize( orientation_t orientation );
    
private:
    DigitalOut _lcd_pin_cs, _lcd_pin_reset, _lcd_pin_rs, _lcd_pin_wr, _lcd_pin_rd;
    BusOut* _lcd_port;
    orientation_t _orientation;

private:
    virtual void writeCmd( unsigned short cmd );
    virtual void writeData( unsigned short data );
    virtual void writeCmdData( unsigned short cmd, unsigned short data );
};

#endif /* SSD1289_H */