![](/media/cache/group/silicon-labs-logo-red_Zq62zJd.png.50x50_q85.png)
Demo program for driving the memory LCD on the Zero Gecko Starter Kit.
This demo program shows how to drive the memory LCD on the Zero Gecko Starter Kit, by using asynchronous transfers.
Information
All examples in this repo are considered EXPERIMENTAL QUALITY, meaning this code has been created as one-off proof-of-concept and is suitable as a demonstration for experimental purposes only. This code will not be regularly maintained by Silicon Labs and there is no guarantee that these projects will work across all environments, SDK versions and hardware.
Diff: main.cpp
- Revision:
- 3:95c3a389bc88
- Parent:
- 2:66aa675cb1a7
- Child:
- 7:ce493681a94b
diff -r 66aa675cb1a7 -r 95c3a389bc88 main.cpp --- a/main.cpp Fri Apr 17 15:42:54 2015 -0400 +++ b/main.cpp Fri Apr 17 15:50:48 2015 -0400 @@ -2,14 +2,29 @@ #include "mbed_logo.h" /******************** Define I/O *****************************/ DigitalOut myled(LED1); - -#define SCK PC15 -#define MOSI PD7 + +#if defined(TARGET_EFM32ZG_STK3200) +#define SCK_PIN PC15 +#define MOSI_PIN PD7 +#define CS_PIN PE11 +#define EXTCOM_PIN PE10 +#define DISP_PIN PA10 +#define DISPSEL_PIN PA8 +#elif defined (TARGET_EFM32HG_STK3400) +#define SCK_PIN PE12 +#define MOSI_PIN PE10 +#define CS_PIN PA10 +#define EXTCOM_PIN PF3 +#define DISP_PIN PA8 +#define DISPSEL_PIN NC +#else +#error "undefined pinout" +#endif -DigitalOut CS(PE11); -DigitalOut EXTCOM(PE10); -DigitalOut DISP(PA10); -DigitalOut DISP_SEL(PA8); +DigitalOut CS(CS_PIN); +DigitalOut EXTCOM(EXTCOM_PIN); +DigitalOut DISP(DISP_PIN); +DigitalOut DISP_SEL(DISPSEL_PIN); SPI displaySPI(MOSI, NC, SCK); silabs::LS013B7DH03 display(&displaySPI, &CS, &EXTCOM);