Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
memLCD8 Class Reference
display class for JDI MIP8(memory in pixel 8 color display) More...
#include <MIP8F_SPI.h>
Public Member Functions | |
memLCD8 (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName disp, PinName power) | |
Constructor : Set MPU pin names. | |
void | locate (int x, int y) |
set allocation for font display | |
void | set_font (unsigned char *f) |
set font name | |
void | setWH (int width, int height) |
set a display size ,width ,height | |
void | SwDisp (bool ONorOFF) |
set the Diaplay On/Off data | |
void | foreground (uint8_t colour) |
set color data of foreground | |
void | background (uint8_t colour) |
set color data of background | |
void | command (char command) |
transfer a command code to the display by SPI | |
void | SetTransfermode (int transfermode) |
set Configuration for transfer mode | |
void | set_FixedFontWidth (unsigned char width) |
setting fixed width between charactor and charctor for font display | |
void | set_ActualFontWidth (void) |
setting Actual width between charactor and charctor for font display | |
unsigned char | get_Background (void) |
get color data of background | |
void | pixel (int x, uint8_t color) |
Transfer One Pixel Data with x,y allocation Line buffer mode. | |
void | clsLINEBUF (void) |
clear line buffer data by background color data | |
int * | GetPixelValueFromLineBuffer (int _x, uint8_t *buff) |
Get Edited data for SPI transfer from line buffer. | |
void | writeDISPLinebuffer (void) |
Transfer Pixel Data from same Line buffer to Display. | |
void | writeDISP (int line, int transfermode) |
Transfer Pixel Data from line buffer to Display. | |
void | pixel (int x, int y, uint8_t color) |
Transfer One Pixel Data with x,y allocation. | |
void | writeDISP (void) |
Transfer Pixel Data from frame buffer to Display. | |
void | writeDISP (int transfermode) |
Transfer Pixel Data from buffer to Display. | |
void | writeDISP (int startline, int endline, int transfermode) |
Transfer Pixel Data : from Start line number to Display of frame buffer. | |
void | clsBUF (void) |
clear buffer data by background color data | |
void | character (int x, int y, int c) |
dispay a character by bog font. | |
void | circle (int x0, int y0, int r, uint8_t color) |
dispay a circle line by color data | |
void | fillcircle (int x0, int y0, int r, uint8_t color) |
dispay a filled circle by color data | |
void | hline (int x0, int x1, int y, uint8_t color) |
dispay a horizontal line by color data | |
void | vline (int x, int y0, int y1, uint8_t color) |
dispay a vertical line by color data | |
void | line (int x0, int y0, int x1, int y1, uint8_t color) |
dispay a line by color data | |
void | rect (int x0, int y0, int x1, int y1, uint8_t color) |
dispay a rectangle line by color data | |
void | fillrect (int x0, int y0, int x1, int y1, uint8_t color) |
dispay a filled rectangle by color data | |
void | Symbol (unsigned int x, unsigned int y, unsigned char *symbol) |
dispay the image from symbol data | |
int * | GetPixelValue (int x, int y, uint8_t *buff) |
Get Edited data for SPI transfer. | |
int | textout (int x, int y, char *text) |
display the text. | |
void | oblique (int x, int y, int c) |
dispay a oblique typte character by big font. | |
int | obliqueout (int x, int y, char *text) |
display the oblique text. | |
int | obliqueout_multi (int x, int y, char *text, int rx, int ry) |
display the oblique text. | |
void | oblique_multi (int x, int y, int c, int rx, int ry) |
dispay a oblique typte character by big font. | |
void | movie_pixel (int x, int y, uint8_t color, int memnum) |
Transfer One Pixel Data with x,y allocation to Animation buffer. | |
void | makeMovieFrame (int sx, int sy, int memnum) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer. | |
void | makeMovieFrame_Reverse (int sx, int sy, int memnum) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer. | |
void | makeMovieFrame_Updown (int sx, int sy, int memnum) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer. | |
void | RestoreMovieFrame (int sx, int sy, int memnum) |
Transfer Pixel Data of backuped original frame buffer with x,y allocation to frame buffer. | |
Protected Member Functions | |
virtual int | _putc (int value) |
putc | |
virtual int | _getc () |
getc | |
Protected Attributes | |
SPI | _spi |
SPI class. | |
DigitalOut | _cs |
pin class , SPI line | |
DigitalOut | _disp |
display on/off | |
DigitalOut | _power |
diplay power on/off | |
char | _foreground |
foreground color of display | |
char | _background |
background color of display | |
unsigned char | _FixedFontWidth |
Fixed Font width size if _FixedFontWidth==0, use actual Font width size. | |
uint8_t | _dispBUF [FRAME_SIZE] |
frame buffer for display | |
uint8_t | _dispLINEBUF [LINE_SIZE] |
line buffer for display | |
int | _height |
height,diplay pixel size | |
int | _width |
width,diplay pixel size | |
char | TrModeCommand |
SPI transfer mode command to MIP8 diplay. |
Detailed Description
display class for JDI MIP8(memory in pixel 8 color display)
spi-transfer has 3 mode. 4bit mode is color display, this bit arrange is R,G,B,x. R,G,B = R,G,B subpixel bit. a x bit is Dummy. No ues(3bit mode is color display, this bit arrange is R,G,B. R,G,B = R,G,B subpixel bit. No bit is Dummy.) 1bit mode is monocrome display,high speed refresh mode. a only Green subpixel of bitmap data is transfered.
Definition at line 79 of file MIP8F_SPI.h.
Constructor & Destructor Documentation
memLCD8 | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | disp, | ||
PinName | power | ||
) |
Constructor : Set MPU pin names.
Definition at line 34 of file MIP8F_SPI.cpp.
Member Function Documentation
int _getc | ( | ) | [protected, virtual] |
getc
Definition at line 190 of file MIP8F_SPI.cpp.
int _putc | ( | int | value ) | [protected, virtual] |
putc
Definition at line 170 of file MIP8F_SPI.cpp.
void background | ( | uint8_t | colour ) |
set color data of background
Definition at line 140 of file MIP8F_SPI.cpp.
void character | ( | int | x, |
int | y, | ||
int | c | ||
) |
dispay a character by bog font.
big font is that "char data" byte size is over 0xff.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char c : a charactor.
Definition at line 440 of file MIP8F_SPI.cpp.
void circle | ( | int | x0, |
int | y0, | ||
int | r, | ||
uint8_t | color | ||
) |
dispay a circle line by color data
Definition at line 635 of file MIP8F_SPI.cpp.
void clsBUF | ( | void | ) |
clear buffer data by background color data
Definition at line 983 of file MIP8F_SPI.cpp.
void clsLINEBUF | ( | void | ) |
clear line buffer data by background color data
Definition at line 357 of file MIP8F_SPI.cpp.
void command | ( | char | command ) |
transfer a command code to the display by SPI
Definition at line 156 of file MIP8F_SPI.cpp.
void fillcircle | ( | int | x0, |
int | y0, | ||
int | r, | ||
uint8_t | color | ||
) |
dispay a filled circle by color data
Definition at line 656 of file MIP8F_SPI.cpp.
void fillrect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
uint8_t | color | ||
) |
dispay a filled rectangle by color data
Definition at line 785 of file MIP8F_SPI.cpp.
void foreground | ( | uint8_t | colour ) |
set color data of foreground
Definition at line 132 of file MIP8F_SPI.cpp.
unsigned char get_Background | ( | void | ) |
get color data of background
Definition at line 197 of file MIP8F_SPI.cpp.
int * GetPixelValue | ( | int | _x, |
int | _y, | ||
uint8_t * | buff | ||
) |
Get Edited data for SPI transfer.
- Parameters:
-
[in] int x : horizontal allocation left to right [in] int y : vertival allocation top to bottom [in] uint8_t* buff : buffer data for Display
Definition at line 808 of file MIP8F_SPI.cpp.
int * GetPixelValueFromLineBuffer | ( | int | _x, |
uint8_t * | buff | ||
) |
Get Edited data for SPI transfer from line buffer.
- Parameters:
-
[in] int x : horizontal allocation left to right [in] uint8_t* buff : buffer data for Display
Definition at line 295 of file MIP8F_SPI.cpp.
void hline | ( | int | x0, |
int | x1, | ||
int | y, | ||
uint8_t | color | ||
) |
dispay a horizontal line by color data
Definition at line 674 of file MIP8F_SPI.cpp.
void line | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
uint8_t | color | ||
) |
dispay a line by color data
Definition at line 693 of file MIP8F_SPI.cpp.
void locate | ( | int | x, |
int | y | ||
) |
set allocation for font display
Definition at line 73 of file MIP8F_SPI.cpp.
void makeMovieFrame | ( | int | sx, |
int | sy, | ||
int | memnum | ||
) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer.
- Parameters:
-
[in] int sx : horizontal start allocation left to right [in] int sy : vertival start allocation top to bottom [in] int memnu : animation buffer number.
Definition at line 1013 of file MIP8F_SPI.cpp.
void makeMovieFrame_Reverse | ( | int | sx, |
int | sy, | ||
int | memnum | ||
) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer.
animation data read right to left.
- Parameters:
-
[in] int sx : horizontal start allocation left to right [in] int sy : vertival start allocation top to bottom [in] int memnu : animation buffer number.
Definition at line 1047 of file MIP8F_SPI.cpp.
void makeMovieFrame_Updown | ( | int | sx, |
int | sy, | ||
int | memnum | ||
) |
Transfer Pixel Data of Animation buffer with x,y allocation to frame buffer.
animation data bottom to top.
- Parameters:
-
[in] int sx : horizontal start allocation left to right [in] int sy : vertival start allocation top to bottom [in] int memnu : animation buffer number.
Definition at line 1081 of file MIP8F_SPI.cpp.
void movie_pixel | ( | int | x, |
int | y, | ||
uint8_t | color, | ||
int | memnum | ||
) |
Transfer One Pixel Data with x,y allocation to Animation buffer.
- Parameters:
-
[in] int x : horizontal allocation left to right [in] int y : vertival allocation top to bottom [in] uint8_t color : the color data for Drawing 0x0X x is color data(RGBC) C is not used [in] int memnu : animation buffer number.
Definition at line 1000 of file MIP8F_SPI.cpp.
void oblique | ( | int | x, |
int | y, | ||
int | c | ||
) |
dispay a oblique typte character by big font.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char c : a charactor.
Definition at line 487 of file MIP8F_SPI.cpp.
void oblique_multi | ( | int | x, |
int | y, | ||
int | c, | ||
int | rx, | ||
int | ry | ||
) |
dispay a oblique typte character by big font.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char c : a charactor. [in] int rx : a horizontal multiple numbler [in] int ry : a vertical multiple numbler
Definition at line 537 of file MIP8F_SPI.cpp.
int obliqueout | ( | int | x, |
int | y, | ||
char * | text | ||
) |
display the oblique text.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char* text : strings
Definition at line 396 of file MIP8F_SPI.cpp.
int obliqueout_multi | ( | int | x, |
int | y, | ||
char * | text, | ||
int | rx, | ||
int | ry | ||
) |
display the oblique text.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char* text : strings [in] int rx : a horizontal multiple numbler [in] int ry : a vertical multiple numbler
Definition at line 418 of file MIP8F_SPI.cpp.
void pixel | ( | int | x, |
uint8_t | color | ||
) |
Transfer One Pixel Data with x,y allocation Line buffer mode.
- Parameters:
-
[in] int x : horizontal allocation left to right [in] uint8_t color : the color data for Drawing 0x0X x is color data(RGBC) C is not used
Definition at line 216 of file MIP8F_SPI.cpp.
void pixel | ( | int | x, |
int | y, | ||
uint8_t | color | ||
) |
Transfer One Pixel Data with x,y allocation.
- Parameters:
-
[in] int x : horizontal allocation left to right [in] int y : vertival allocation top to bottom [in] uint8_t color : the color data for Drawing 0x0X x is color data(RGBC) C is not used
Definition at line 796 of file MIP8F_SPI.cpp.
void rect | ( | int | x0, |
int | y0, | ||
int | x1, | ||
int | y1, | ||
uint8_t | color | ||
) |
dispay a rectangle line by color data
Definition at line 765 of file MIP8F_SPI.cpp.
void RestoreMovieFrame | ( | int | sx, |
int | sy, | ||
int | memnum | ||
) |
Transfer Pixel Data of backuped original frame buffer with x,y allocation to frame buffer.
- Parameters:
-
[in] int sx : horizontal start allocation left to right [in] int sy : vertival start allocation top to bottom [in] int memnu : animation buffer number.
Definition at line 1115 of file MIP8F_SPI.cpp.
void set_ActualFontWidth | ( | void | ) |
setting Actual width between charactor and charctor for font display
Definition at line 89 of file MIP8F_SPI.cpp.
void set_FixedFontWidth | ( | unsigned char | width ) |
setting fixed width between charactor and charctor for font display
Definition at line 82 of file MIP8F_SPI.cpp.
void set_font | ( | unsigned char * | f ) |
set font name
Definition at line 65 of file MIP8F_SPI.cpp.
void SetTransfermode | ( | int | transfermode ) |
set Configuration for transfer mode
- Parameters:
-
[in] int transfermode : instruction the transfer data size ,4bit,3bit,1bit and some parameter
Definition at line 98 of file MIP8F_SPI.cpp.
void setWH | ( | int | width, |
int | height | ||
) |
set a display size ,width ,height
Definition at line 123 of file MIP8F_SPI.cpp.
void SwDisp | ( | bool | ONorOFF ) |
set the Diaplay On/Off data
Definition at line 148 of file MIP8F_SPI.cpp.
void Symbol | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned char * | symbol | ||
) |
dispay the image from symbol data
Definition at line 603 of file MIP8F_SPI.cpp.
int textout | ( | int | x, |
int | y, | ||
char * | text | ||
) |
display the text.
- Parameters:
-
[in] int x : horizontal allocation , up-left of text [in] int y : vertical allocation , bottom-right of text [in] char* text : strings
Definition at line 376 of file MIP8F_SPI.cpp.
void vline | ( | int | x, |
int | y0, | ||
int | y1, | ||
uint8_t | color | ||
) |
dispay a vertical line by color data
Definition at line 683 of file MIP8F_SPI.cpp.
void writeDISP | ( | int | startline, |
int | endline, | ||
int | transfermode | ||
) |
Transfer Pixel Data : from Start line number to Display of frame buffer.
- Parameters:
-
[in] int startline : Start line number to Display [in] int endline : end line number to Display [in] int transfermode : instruction the transfer data size ,4bit,3bit,1bit
Definition at line 913 of file MIP8F_SPI.cpp.
void writeDISP | ( | int | line, |
int | transfermode | ||
) |
Transfer Pixel Data from line buffer to Display.
- Parameters:
-
[in] int line : set line number for display. [in] int transfermode : instruction the transfer data size ,4bit,3bit,1bit
Definition at line 254 of file MIP8F_SPI.cpp.
void writeDISP | ( | int | transfermode ) |
Transfer Pixel Data from buffer to Display.
- Parameters:
-
[in] int transfermode : instruction the transfer data size ,4bit,3bit,1bit
Definition at line 871 of file MIP8F_SPI.cpp.
void writeDISP | ( | void | ) |
Transfer Pixel Data from frame buffer to Display.
Definition at line 956 of file MIP8F_SPI.cpp.
void writeDISPLinebuffer | ( | void | ) |
Transfer Pixel Data from same Line buffer to Display.
Definition at line 225 of file MIP8F_SPI.cpp.
Field Documentation
char _background [protected] |
background color of display
Definition at line 163 of file MIP8F_SPI.h.
DigitalOut _cs [protected] |
pin class , SPI line
Definition at line 154 of file MIP8F_SPI.h.
DigitalOut _disp [protected] |
display on/off
Definition at line 156 of file MIP8F_SPI.h.
uint8_t _dispBUF[FRAME_SIZE] [protected] |
frame buffer for display
Definition at line 173 of file MIP8F_SPI.h.
uint8_t _dispLINEBUF[LINE_SIZE] [protected] |
line buffer for display
Definition at line 179 of file MIP8F_SPI.h.
unsigned char _FixedFontWidth [protected] |
Fixed Font width size if _FixedFontWidth==0, use actual Font width size.
Definition at line 169 of file MIP8F_SPI.h.
char _foreground [protected] |
foreground color of display
Definition at line 161 of file MIP8F_SPI.h.
int _height [protected] |
height,diplay pixel size
Definition at line 182 of file MIP8F_SPI.h.
DigitalOut _power [protected] |
diplay power on/off
Definition at line 158 of file MIP8F_SPI.h.
SPI _spi [protected] |
SPI class.
Definition at line 152 of file MIP8F_SPI.h.
int _width [protected] |
width,diplay pixel size
Definition at line 184 of file MIP8F_SPI.h.
char TrModeCommand [protected] |
SPI transfer mode command to MIP8 diplay.
Definition at line 197 of file MIP8F_SPI.h.
Generated on Fri Jul 15 2022 22:15:16 by
