Simple animation demo.

Dependencies:   AkiSpiLcd mbed

Fork of AkiSpiLcd_example by Kazuki Yamamoto

Committer:
k4zuki
Date:
Tue May 06 17:26:25 2014 +0000
Revision:
5:8883e74c0f11
Parent:
3:8dbf3336dc66
Child:
6:b4ae3f550487
bug fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
k4zuki 0:3569e2cfb60b 1 #define MBEDSHIELD_050
k4zuki 0:3569e2cfb60b 2
k4zuki 0:3569e2cfb60b 3 #include "mbed.h"
k4zuki 0:3569e2cfb60b 4 #include "hogepic.h"
k4zuki 0:3569e2cfb60b 5 #include "AkiSpiLcd.h"
k4zuki 1:be675380f70b 6
k4zuki 0:3569e2cfb60b 7 /*
k4zuki 1:be675380f70b 8 1 SCLK D3=p13
k4zuki 1:be675380f70b 9 2 MOSI D5=p11
k4zuki 1:be675380f70b 10 3 CS D2=p14
k4zuki 1:be675380f70b 11 4 DISP enable D5=p22
k4zuki 0:3569e2cfb60b 12 */
k4zuki 1:be675380f70b 13
k4zuki 0:3569e2cfb60b 14 AkiSpiLcd LCD(MOSI_, SCK_, D2, D5);
k4zuki 0:3569e2cfb60b 15 DigitalOut myled(LED1);
k4zuki 5:8883e74c0f11 16 extern const uint8_t hogepic[];
k4zuki 5:8883e74c0f11 17
k4zuki 0:3569e2cfb60b 18 int main()
k4zuki 0:3569e2cfb60b 19 {
k4zuki 0:3569e2cfb60b 20
k4zuki 0:3569e2cfb60b 21 wait_ms(1);
k4zuki 0:3569e2cfb60b 22 LCD.cls();
k4zuki 0:3569e2cfb60b 23 LCD.updateSingle(10,(uint8_t*)(hogepic+2000));
k4zuki 0:3569e2cfb60b 24 LCD.updateMulti(100,(240-100),(uint8_t*)(hogepic));
k4zuki 3:8dbf3336dc66 25
k4zuki 1:be675380f70b 26 while(1) {
k4zuki 3:8dbf3336dc66 27 for(int i=0; i<240; i++) {
k4zuki 3:8dbf3336dc66 28 LCD.updateMulti(i,(240-i),(uint8_t*)(hogepic));
k4zuki 3:8dbf3336dc66 29 LCD.updateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i)));
k4zuki 3:8dbf3336dc66 30 }
k4zuki 0:3569e2cfb60b 31 }
k4zuki 0:3569e2cfb60b 32 }
k4zuki 0:3569e2cfb60b 33