Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EPD_GDEW075T8 mbed
main.cpp@5:326a3e0e6950, 2018-10-17 (annotated)
- Committer:
- zhangyx
- Date:
- Wed Oct 17 14:00:37 2018 +0000
- Revision:
- 5:326a3e0e6950
- Parent:
- 3:c31bcab79c10
- Child:
- 6:0d38aa19198e
update
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| HarryChen | 0:770c45c51d26 | 1 | #include "mbed.h" |
| HarryChen | 0:770c45c51d26 | 2 | #include "GDEW075T8.h" |
| HarryChen | 1:4083aff0fa16 | 3 | #include "DemoPixelSource.h" |
| HarryChen | 0:770c45c51d26 | 4 | |
| HarryChen | 2:686cb2cf459f | 5 | // TODO: use real pin name |
| HarryChen | 3:c31bcab79c10 | 6 | DigitalOut nCS(PA_4); |
| HarryChen | 3:c31bcab79c10 | 7 | DigitalOut nDC(PA_1); |
| HarryChen | 3:c31bcab79c10 | 8 | DigitalOut nRST(PA_3); |
| HarryChen | 3:c31bcab79c10 | 9 | DigitalIn ready(PA_0); |
| HarryChen | 3:c31bcab79c10 | 10 | SPI spi(PA_7, PA_6, PA_5); |
| HarryChen | 2:686cb2cf459f | 11 | |
| HarryChen | 0:770c45c51d26 | 12 | int main() { |
| HarryChen | 1:4083aff0fa16 | 13 | |
| zhangyx | 5:326a3e0e6950 | 14 | spi.frequency(4000000); |
| zhangyx | 5:326a3e0e6950 | 15 | |
| zhangyx | 5:326a3e0e6950 | 16 | GDE::DemoPixelSource *demoSource = new GDE::DemoPixelSource(); |
| HarryChen | 1:4083aff0fa16 | 17 | |
| HarryChen | 2:686cb2cf459f | 18 | GDE::setup(&nCS, &nDC, &nRST, &ready, &spi); |
| HarryChen | 1:4083aff0fa16 | 19 | GDE::start(); |
| zhangyx | 5:326a3e0e6950 | 20 | while(true){ |
| zhangyx | 5:326a3e0e6950 | 21 | demoSource->setColor(false); |
| zhangyx | 5:326a3e0e6950 | 22 | GDE::showPixels(demoSource); |
| zhangyx | 5:326a3e0e6950 | 23 | demoSource->setColor(true); |
| zhangyx | 5:326a3e0e6950 | 24 | GDE::showPixels(demoSource); |
| zhangyx | 5:326a3e0e6950 | 25 | } |
| HarryChen | 1:4083aff0fa16 | 26 | GDE::stop(); |
| HarryChen | 0:770c45c51d26 | 27 | } |
