SSD1331 Oled driver library for 96x64 colour Oled display. Demo included in .h file
Dependents: Oled-SSD1331 PJ12_device
Diff: ssd1331.h
- Revision:
- 1:f3f6624f45d4
- Parent:
- 0:3d7d1aec706b
- Child:
- 2:1204274fad8f
diff -r 3d7d1aec706b -r f3f6624f45d4 ssd1331.h
--- a/ssd1331.h Tue Apr 26 22:51:28 2016 +0000
+++ b/ssd1331.h Sun May 01 12:37:44 2016 +0000
@@ -4,7 +4,6 @@
#include "mbed.h"
-
// Screen Settings
#define width 96-1 // Max X axial direction in screen
#define height 64-1 // Max Y axial direction in screen
@@ -23,7 +22,7 @@
#define WH 3
#define WHx36 4
#define X_width 6 // character's width
-#define Y_width 8 // character's height
+#define Y_height 8 // character's height
// GAC hardware acceleration commands
@@ -160,6 +159,13 @@
void Scrollstart();
void Scrollstop();
void Copy(int src_x1,int src_y1,int src_x2,int src_y2, int dst_x,int dst_y);
+ void character(int x, int y, int c);
+ void set_font(unsigned char* f);
+ void drawBitmap(const uint8_t *bitmap, int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
+ int BMP_16(const char *Name_BMP, unsigned int x, unsigned int y);
+
+ int DrawBitmapFile(const char *Name_BMP);
+
protected:
// Stream implementation functions
@@ -173,14 +179,30 @@
void DataWrite_to(unsigned int Dat);
void FontSizeConvert(int *lpx, int *lpy);
void PutChar(int x,int y,unsigned int a);
+ void PutCharInt(int x,int y,unsigned int a);
+ void putp(int colour);
+ unsigned char* font;
unsigned int Char_Color; // text color
unsigned int BGround_Color; // background color
- int x_locate;
- int y_locate;
+ void window(int x, int y, int w, int h);
+ // pixel location
+ short _x;
+ short _y;
+
+ // window location
+ short _x1;
+ short _x2;
+ short _y1;
+ short _y2;
+ int char_x;
+ int char_y;
int chr_size;
-
+ int cwidth; // character's width
+ int cvert; // character's height
+ int externalfont;
DigitalOut CS, RES, DC;
SPI spi; // mosi, miso, sclk
};
-#endif
\ No newline at end of file
+#endif
+
Display Module .95" 96x64 Oled with SPI interface