A minimal sample for the RA8875 display.

Dependencies:   mbed RA8875

Committer:
WiredHome
Date:
Sat Jan 09 21:04:05 2016 +0000
Revision:
0:8446f99d40a0
Child:
1:55ebb2423290
Simplest example for RA8875.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WiredHome 0:8446f99d40a0 1 #include "mbed.h"
WiredHome 0:8446f99d40a0 2
WiredHome 0:8446f99d40a0 3 #include "RA8875.h"
WiredHome 0:8446f99d40a0 4 RA8875 lcd(p5, p6, p7, p12, NC, "tft");
WiredHome 0:8446f99d40a0 5
WiredHome 0:8446f99d40a0 6 int main()
WiredHome 0:8446f99d40a0 7 {
WiredHome 0:8446f99d40a0 8 lcd.init();
WiredHome 0:8446f99d40a0 9 lcd.printf("printing 3 x 2 = %d", 3*2);
WiredHome 0:8446f99d40a0 10 lcd.circle( 400,25, 25, BrightRed);
WiredHome 0:8446f99d40a0 11 lcd.fillcircle( 400,25, 15, RGB(128,255,128));
WiredHome 0:8446f99d40a0 12 lcd.ellipse( 440,75, 35,20, BrightBlue);
WiredHome 0:8446f99d40a0 13 lcd.fillellipse( 440,75, 25,10, Blue);
WiredHome 0:8446f99d40a0 14 lcd.triangle( 440,100, 475,110, 450,125, Magenta);
WiredHome 0:8446f99d40a0 15 lcd.filltriangle( 445,105, 467,111, 452,120, Cyan);
WiredHome 0:8446f99d40a0 16 lcd.rect( 400,130, 475,155, Brown);
WiredHome 0:8446f99d40a0 17 lcd.fillrect( 405,135, 470,150, Pink);
WiredHome 0:8446f99d40a0 18 lcd.roundrect( 410,160, 475,190, 10,8, Yellow);
WiredHome 0:8446f99d40a0 19 lcd.fillroundrect(415,165, 470,185, 5,3, Orange);
WiredHome 0:8446f99d40a0 20 lcd.line( 430,200, 460,230, RGB(0,255,0));
WiredHome 0:8446f99d40a0 21 for (int i=0; i<=30; i+=5)
WiredHome 0:8446f99d40a0 22 lcd.pixel(435+i,200+i, White);
WiredHome 0:8446f99d40a0 23 }