JapanDisplayInc / MIP8F_SPI_Ver40

Dependents:   MIP8f_FRDM_LineBuffer_sample

Embed: (wiki syntax)

« Back to documentation index

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.

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 71 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 28 of file MIP8F_SPI.cpp.


Member Function Documentation

int _getc (  ) [protected, virtual]

getc

Definition at line 178 of file MIP8F_SPI.cpp.

int _putc ( int  value ) [protected, virtual]

putc

Definition at line 158 of file MIP8F_SPI.cpp.

void background ( uint8_t  colour )

set color data of background

Definition at line 128 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]intx : horizontal allocation , up-left of text
[in]inty : vertical allocation , bottom-right of text
[in]charc : a charactor.

Definition at line 405 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 530 of file MIP8F_SPI.cpp.

void clsBUF ( void   )

clear buffer data by background color data

Definition at line 875 of file MIP8F_SPI.cpp.

void clsLINEBUF ( void   )

clear line buffer data by background color data

Definition at line 345 of file MIP8F_SPI.cpp.

void command ( char  command )

transfer a command code to the display by SPI

Definition at line 144 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 551 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 680 of file MIP8F_SPI.cpp.

void foreground ( uint8_t  colour )

set color data of foreground

Definition at line 120 of file MIP8F_SPI.cpp.

unsigned char get_Background ( void   )

get color data of background

Definition at line 185 of file MIP8F_SPI.cpp.

int * GetPixelValue ( int  _x,
int  _y,
uint8_t *  buff 
)

Get Edited data for SPI transfer.

Parameters:
[in]intx : horizontal allocation left to right
[in]inty : vertival allocation top to bottom
[in]uint8_t*buff : buffer data for Display

Definition at line 703 of file MIP8F_SPI.cpp.

int * GetPixelValueFromLineBuffer ( int  _x,
uint8_t *  buff 
)

Get Edited data for SPI transfer from line buffer.

Parameters:
[in]intx : horizontal allocation left to right
[in]uint8_t*buff : buffer data for Display

Definition at line 283 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 569 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 588 of file MIP8F_SPI.cpp.

void locate ( int  x,
int  y 
)

set allocation for font display

Definition at line 61 of file MIP8F_SPI.cpp.

void oblique ( int  x,
int  y,
int  c 
)

dispay a oblique typte character by big font.

Parameters:
[in]intx : horizontal allocation , up-left of text
[in]inty : vertical allocation , bottom-right of text
[in]charc : a charactor.

Definition at line 452 of file MIP8F_SPI.cpp.

int obliqueout ( int  x,
int  y,
char *  text 
)

display the oblique text.

Parameters:
[in]intx : horizontal allocation , up-left of text
[in]inty : vertical allocation , bottom-right of text
[in]char*text : strings

Definition at line 384 of file MIP8F_SPI.cpp.

void pixel ( int  x,
int  y,
uint8_t  color 
)

Transfer One Pixel Data with x,y allocation.

Parameters:
[in]intx : horizontal allocation left to right
[in]inty : vertival allocation top to bottom
[in]uint8_tcolor : the color data for Drawing 0x0X x is color data(RGBC) C is not used

Definition at line 691 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]intx : horizontal allocation left to right
[in]uint8_tcolor : the color data for Drawing 0x0X x is color data(RGBC) C is not used

Definition at line 204 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 660 of file MIP8F_SPI.cpp.

void set_ActualFontWidth ( void   )

setting Actual width between charactor and charctor for font display

Definition at line 77 of file MIP8F_SPI.cpp.

void set_FixedFontWidth ( unsigned char  width )

setting fixed width between charactor and charctor for font display

Definition at line 70 of file MIP8F_SPI.cpp.

void set_font ( unsigned char *  f )

set font name

Definition at line 53 of file MIP8F_SPI.cpp.

void SetTransfermode ( int  transfermode )

set Configuration for transfer mode

Parameters:
[in]inttransfermode : instruction the transfer data size ,4bit,3bit,1bit and some parameter

Definition at line 86 of file MIP8F_SPI.cpp.

void setWH ( int  width,
int  height 
)

set a display size ,width ,height

Definition at line 111 of file MIP8F_SPI.cpp.

void SwDisp ( bool  ONorOFF )

set the Diaplay On/Off data

Definition at line 136 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 498 of file MIP8F_SPI.cpp.

int textout ( int  x,
int  y,
char *  text 
)

display the text.

Parameters:
[in]intx : horizontal allocation , up-left of text
[in]inty : vertical allocation , bottom-right of text
[in]char*text : strings

Definition at line 364 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 578 of file MIP8F_SPI.cpp.

void writeDISP ( void   )

Transfer Pixel Data from frame buffer to Display.

Definition at line 848 of file MIP8F_SPI.cpp.

void writeDISP ( int  transfermode )

Transfer Pixel Data from buffer to Display.

Parameters:
[in]inttransfermode : instruction the transfer data size ,4bit,3bit,1bit

Definition at line 766 of file MIP8F_SPI.cpp.

void writeDISP ( int  line,
int  transfermode 
)

Transfer Pixel Data from line buffer to Display.

Parameters:
[in]intline : set line number for display.
[in]inttransfermode : instruction the transfer data size ,4bit,3bit,1bit

Definition at line 242 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]intstartline : Start line number to Display
[in]intendline : end line number to Display
[in]inttransfermode : instruction the transfer data size ,4bit,3bit,1bit

Definition at line 808 of file MIP8F_SPI.cpp.

void writeDISPLinebuffer ( void   )

Transfer Pixel Data from same Line buffer to Display.

Definition at line 213 of file MIP8F_SPI.cpp.


Field Documentation

char _background [protected]

background color of display

Definition at line 144 of file MIP8F_SPI.h.

DigitalOut _cs [protected]

pin class , SPI line

Definition at line 135 of file MIP8F_SPI.h.

DigitalOut _disp [protected]

display on/off

Definition at line 137 of file MIP8F_SPI.h.

uint8_t _dispBUF[FRAME_SIZE] [protected]

frame buffer for display

Definition at line 154 of file MIP8F_SPI.h.

uint8_t _dispLINEBUF[LINE_SIZE] [protected]

line buffer for display

Definition at line 160 of file MIP8F_SPI.h.

unsigned char _FixedFontWidth [protected]

Fixed Font width size if _FixedFontWidth==0, use actual Font width size.

Definition at line 150 of file MIP8F_SPI.h.

char _foreground [protected]

foreground color of display

Definition at line 142 of file MIP8F_SPI.h.

int _height [protected]

height,diplay pixel size

Definition at line 164 of file MIP8F_SPI.h.

DigitalOut _power [protected]

diplay power on/off

Definition at line 139 of file MIP8F_SPI.h.

SPI _spi [protected]

SPI class.

Definition at line 133 of file MIP8F_SPI.h.

int _width [protected]

width,diplay pixel size

Definition at line 166 of file MIP8F_SPI.h.

char TrModeCommand [protected]

SPI transfer mode command to MIP8 diplay.

Definition at line 172 of file MIP8F_SPI.h.