EmbeddedArtists AB
/
lpc4088_ebb_epaper
Example with the 2.7" epaper display EM027BS013
main.cpp@0:f061f25b8c55, 2014-10-01 (annotated)
- Committer:
- embeddedartists
- Date:
- Wed Oct 01 11:09:45 2014 +0000
- Revision:
- 0:f061f25b8c55
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
embeddedartists | 0:f061f25b8c55 | 1 | #include "mbed.h" |
embeddedartists | 0:f061f25b8c55 | 2 | #include "EM027BS013.h" |
embeddedartists | 0:f061f25b8c55 | 3 | #include "image_data.h" |
embeddedartists | 0:f061f25b8c55 | 4 | |
embeddedartists | 0:f061f25b8c55 | 5 | /* |
embeddedartists | 0:f061f25b8c55 | 6 | * Example taken from http://mbed.org/users/embeddedartists/code/app_epaper_EM027BS013/ |
embeddedartists | 0:f061f25b8c55 | 7 | * |
embeddedartists | 0:f061f25b8c55 | 8 | * The following macros makes it easier to specify all the 12 arguments to the |
embeddedartists | 0:f061f25b8c55 | 9 | * EM027BS013 constructor: |
embeddedartists | 0:f061f25b8c55 | 10 | */ |
embeddedartists | 0:f061f25b8c55 | 11 | |
embeddedartists | 0:f061f25b8c55 | 12 | /* |
embeddedartists | 0:f061f25b8c55 | 13 | * LPC4088EBB_SEC |
embeddedartists | 0:f061f25b8c55 | 14 | * -------------- |
embeddedartists | 0:f061f25b8c55 | 15 | * Embedded Artists' LPC4088 QuickStart Board + LPC4088 Experiment Base Board. |
embeddedartists | 0:f061f25b8c55 | 16 | * The display module should be connected using the 14-pos serial expansion |
embeddedartists | 0:f061f25b8c55 | 17 | * connector on the base board. |
embeddedartists | 0:f061f25b8c55 | 18 | */ |
embeddedartists | 0:f061f25b8c55 | 19 | #define LPC4088EBB_SEC p13,p11,p12,p14,p10,p9,p20,p19,p37,p38,p17,p18 |
embeddedartists | 0:f061f25b8c55 | 20 | |
embeddedartists | 0:f061f25b8c55 | 21 | |
embeddedartists | 0:f061f25b8c55 | 22 | EM027BS013 epaper(LPC4088EBB_SEC); |
embeddedartists | 0:f061f25b8c55 | 23 | |
embeddedartists | 0:f061f25b8c55 | 24 | /* |
embeddedartists | 0:f061f25b8c55 | 25 | Hardware Setup: |
embeddedartists | 0:f061f25b8c55 | 26 | |
embeddedartists | 0:f061f25b8c55 | 27 | - Jumpers JP1..JP6 should be in position 1-2 |
embeddedartists | 0:f061f25b8c55 | 28 | - Jumpers in J14 should NOT be inserted |
embeddedartists | 0:f061f25b8c55 | 29 | - Jumper J7 should be inserted |
embeddedartists | 0:f061f25b8c55 | 30 | - Display in connector J5. |
embeddedartists | 0:f061f25b8c55 | 31 | */ |
embeddedartists | 0:f061f25b8c55 | 32 | |
embeddedartists | 0:f061f25b8c55 | 33 | int main() { |
embeddedartists | 0:f061f25b8c55 | 34 | while(1) { |
embeddedartists | 0:f061f25b8c55 | 35 | epaper.drawImage((uint8_t*)&image_array_270_ea); |
embeddedartists | 0:f061f25b8c55 | 36 | wait(5); |
embeddedartists | 0:f061f25b8c55 | 37 | epaper.drawImage((uint8_t*)&image_array_270_text); |
embeddedartists | 0:f061f25b8c55 | 38 | wait(5); |
embeddedartists | 0:f061f25b8c55 | 39 | epaper.drawImage((uint8_t*)&image_array_270_1); |
embeddedartists | 0:f061f25b8c55 | 40 | wait(5); |
embeddedartists | 0:f061f25b8c55 | 41 | epaper.drawImage((uint8_t*)&image_array_270_2); |
embeddedartists | 0:f061f25b8c55 | 42 | wait(5); |
embeddedartists | 0:f061f25b8c55 | 43 | } |
embeddedartists | 0:f061f25b8c55 | 44 | } |