Test program for E.Paper display for LPC1768

Dependencies:   BurstSPI EaEpaper TFT_fonts mbed

Fork of epaper_mbed_130411_KL25Z by Peter Drescher

Committer:
dreschpe
Date:
Sun Nov 10 19:33:44 2013 +0000
Revision:
0:057244fcbbb6
Child:
1:5ba919589a12
Test program for E.Paper lib and KL25Z board

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dreschpe 0:057244fcbbb6 1 #include "mbed.h"
dreschpe 0:057244fcbbb6 2 #include "EaEpaper.h"
dreschpe 0:057244fcbbb6 3 #include "Arial28x28.h"
dreschpe 0:057244fcbbb6 4 #include "Arial12x12.h"
dreschpe 0:057244fcbbb6 5 #include "font_big.h"
dreschpe 0:057244fcbbb6 6 #include "graphics.h"
dreschpe 0:057244fcbbb6 7
dreschpe 0:057244fcbbb6 8 EaEpaper epaper(PTD7, // PWR_CTRL
dreschpe 0:057244fcbbb6 9 PTD6, // BORDER
dreschpe 0:057244fcbbb6 10 PTE31, // DISCHARGE
dreschpe 0:057244fcbbb6 11 PTA17, // RESET_DISP
dreschpe 0:057244fcbbb6 12 PTA16, // BUSY
dreschpe 0:057244fcbbb6 13 PTC17, // SSEL
dreschpe 0:057244fcbbb6 14 PTD4, // PWM
dreschpe 0:057244fcbbb6 15 PTD2,PTD3,PTD1, // MOSI,MISO,SCLK
dreschpe 0:057244fcbbb6 16 PTE0,PTE1); // SDA,SDL
dreschpe 0:057244fcbbb6 17
dreschpe 0:057244fcbbb6 18 int main() {
dreschpe 0:057244fcbbb6 19
dreschpe 0:057244fcbbb6 20 epaper.cls();
dreschpe 0:057244fcbbb6 21 epaper.set_font((unsigned char*) Arial28x28); // select the font
dreschpe 0:057244fcbbb6 22 epaper.locate(5,20);
dreschpe 0:057244fcbbb6 23 epaper.printf("Hello Mbed");
dreschpe 0:057244fcbbb6 24 epaper.rect(3,15,150,50,1);
dreschpe 0:057244fcbbb6 25
dreschpe 0:057244fcbbb6 26 epaper.set_font((unsigned char*) Arial12x12);
dreschpe 0:057244fcbbb6 27 epaper.locate(5,60);
dreschpe 0:057244fcbbb6 28 epaper.printf("small Font");
dreschpe 0:057244fcbbb6 29 epaper.set_font((unsigned char*) Neu42x35);
dreschpe 0:057244fcbbb6 30 epaper.locate(5,70);
dreschpe 0:057244fcbbb6 31 epaper.printf("big Font");
dreschpe 0:057244fcbbb6 32
dreschpe 0:057244fcbbb6 33 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 34
dreschpe 0:057244fcbbb6 35 wait(5);
dreschpe 0:057244fcbbb6 36 epaper.fillcircle(180,30,22,1);
dreschpe 0:057244fcbbb6 37 epaper.circle(160,150,20,1);
dreschpe 0:057244fcbbb6 38 epaper.write_disp(); // update screen
dreschpe 0:057244fcbbb6 39
dreschpe 0:057244fcbbb6 40 }