for yamada

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ssd1963.h Source File

ssd1963.h

00001 #define D0 p26
00002 #define D1 p27
00003 #define D2 p30
00004 #define D3 p29
00005 #define D4 p28
00006 #define D5 p24
00007 #define D6 p23
00008 #define D7 p22
00009 
00010 #define CS p21
00011 #define RD p25
00012 #define RS p19
00013 #define WR p20
00014 #define RST p18
00015 
00016 #define ENDCOL          480 // X
00017 #define ENDROW          272 // Y
00018 #define XChar           (short)((ENDCOL) / 12.3)
00019 #define YLine           (short)((ENDROW) / 18)
00020 
00021 #ifndef MBED_SSD1963_H
00022 #define MBED_SSD1963_H
00023 
00024 class TFTout{
00025 public:
00026     TFTout(PinName cs,PinName rd,PinName rs,PinName wr,PinName rst,PinName d0,PinName d1,PinName d2,PinName d3,PinName d4,PinName d5,PinName d6,PinName d7);
00027            
00028     void lcd_out(int rs,char data);
00029     void Command_Write(unsigned char command,unsigned char data1);
00030     void SendData(unsigned long color);
00031     void WindowSet(unsigned int s_x,unsigned int e_x,unsigned int s_y,unsigned int e_y);
00032     void WRITE_PIXEL(int x,int y,unsigned long Color);
00033 
00034     void lcd_Init(void);
00035     void lcd_Clear(unsigned long Color);
00036     void lcd_Char(char colum, char line, unsigned char letter, unsigned long Color1, unsigned long Color2);
00037     void lcd_Str(char colum, char line, char *s, unsigned long Color1, unsigned long Color2);
00038     void lcd_Line(short x0, short y0, short x1, short y1, unsigned long Color);
00039     void lcd_Circle(int x0, int y0, int r, unsigned long color);
00040 private:       
00041     DigitalOut _CSout,_RDout,_RSout, _WRout, _RSTout;
00042     BusOut _lcd_bus;
00043 };
00044 
00045 #endif