ban4jp -
/
AkiSpiLcd_demo
Simple animation demo.
Fork of AkiSpiLcd_example by
Diff: main.cpp
- Revision:
- 3:8dbf3336dc66
- Parent:
- 1:be675380f70b
- Child:
- 5:8883e74c0f11
diff -r 3554ec6df722 -r 8dbf3336dc66 main.cpp --- a/main.cpp Sun May 04 04:07:10 2014 +0000 +++ b/main.cpp Tue May 06 13:01:55 2014 +0000 @@ -13,14 +13,14 @@ AkiSpiLcd LCD(MOSI_, SCK_, D2, D5); DigitalOut myled(LED1); -Ticker disp; +//Ticker disp; extern volatile const uint8_t hogepic[]; - +/* void dispinvert(void) { LCD.cominvert(); } - +*/ int main() { @@ -29,16 +29,16 @@ LCD.cls(); LCD.updateSingle(10,(uint8_t*)(hogepic+2000)); LCD.updateMulti(100,(240-100),(uint8_t*)(hogepic)); - + while(1) { - for(int i=0;i<240;i++){ - LCD.updateMulti(i,(240-i),(uint8_t*)(hogepic)); - LCD.updateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i))); - } -/* myled = 1; - wait(0.2); - myled = 0; - wait(0.2);*/ + for(int i=0; i<240; i++) { + LCD.updateMulti(i,(240-i),(uint8_t*)(hogepic)); + LCD.updateMulti(0,(i),(uint8_t*)(hogepic+50*(240-i))); + } + /* myled = 1; + wait(0.2); + myled = 0; + wait(0.2);*/ } }