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.
Dependents: MIP8f_FRDM_sample MIP8f_FRDM_MonochromeDisplay_sample
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 | writeDISP (int transfermode) |
| Transfer Pixel Data from buffer to Display. | |
| void | pixel (int x, int y, uint8_t color) |
| Transfer One Pixel Data with x,y allocation. | |
| void | clsBUF (void) |
| clear buffer data by background color data | |
| void | locate (int x, int y) |
| set allocation for font | |
| 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 | setWH (int width, int height) |
| set a display size ,width ,height | |
| void | SwDisp (bool ONorOFF) |
| set the Diaplay On/Off data | |
| void | character (int x, int y, int c) |
| dispay character by 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 a image from symbol data | |
| void | set_font (unsigned char *f) |
| set font name | |
| void | SetTransfermode (int transfermode) |
| set Configuration for transfer mode | |
| int * | GetPixelValue (int x, int y, uint8_t *buff) |
| Get Edited data for SPI transfer. | |
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 | |
| uint8_t | _dispBUF [FRAME_SIZE] |
| frame 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 62 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 23 of file MIP8F_SPI.cpp.
Member Function Documentation
| int _getc | ( | ) | [protected, virtual] |
getc
Definition at line 65 of file MIP8F_SPI.cpp.
| int _putc | ( | int | value ) | [protected, virtual] |
putc
Definition at line 48 of file MIP8F_SPI.cpp.
| void background | ( | uint8_t | colour ) |
set color data of background
Definition at line 553 of file MIP8F_SPI.cpp.
| void character | ( | int | x, |
| int | y, | ||
| int | c | ||
| ) |
dispay character by font
Definition at line 89 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 168 of file MIP8F_SPI.cpp.
| void clsBUF | ( | void | ) |
clear buffer data by background color data
Definition at line 532 of file MIP8F_SPI.cpp.
| void command | ( | char | command ) |
transfer a command code to the display by SPI
Definition at line 576 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 188 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 317 of file MIP8F_SPI.cpp.
| void foreground | ( | uint8_t | colour ) |
set color data of foreground
Definition at line 545 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 440 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 205 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 224 of file MIP8F_SPI.cpp.
| void locate | ( | int | x, |
| int | y | ||
| ) |
set allocation for font
Definition at line 81 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 363 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 296 of file MIP8F_SPI.cpp.
| void set_font | ( | unsigned char * | f ) |
set font name
Definition at line 73 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 505 of file MIP8F_SPI.cpp.
| void setWH | ( | int | width, |
| int | height | ||
| ) |
set a display size ,width ,height
Definition at line 567 of file MIP8F_SPI.cpp.
| void SwDisp | ( | bool | ONorOFF ) |
set the Diaplay On/Off data
Definition at line 589 of file MIP8F_SPI.cpp.
| void Symbol | ( | unsigned int | x, |
| unsigned int | y, | ||
| unsigned char * | symbol | ||
| ) |
dispay a image from symbol data
Definition at line 127 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 215 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 372 of file MIP8F_SPI.cpp.
Field Documentation
char _background [protected] |
background color of display
Definition at line 116 of file MIP8F_SPI.h.
DigitalOut _cs [protected] |
pin class , SPI line
Definition at line 107 of file MIP8F_SPI.h.
DigitalOut _disp [protected] |
display on/off
Definition at line 109 of file MIP8F_SPI.h.
uint8_t _dispBUF [protected] |
char _foreground [protected] |
foreground color of display
Definition at line 114 of file MIP8F_SPI.h.
int _height [protected] |
height,diplay pixel size
Definition at line 131 of file MIP8F_SPI.h.
DigitalOut _power [protected] |
diplay power on/off
Definition at line 111 of file MIP8F_SPI.h.
SPI _spi [protected] |
SPI class.
Definition at line 105 of file MIP8F_SPI.h.
int _width [protected] |
width,diplay pixel size
Definition at line 133 of file MIP8F_SPI.h.
char TrModeCommand [protected] |
SPI transfer mode command to MIP8 diplay.
Definition at line 139 of file MIP8F_SPI.h.
Generated on Sat Jul 16 2022 04:30:34 by
1.7.2