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.
main.cpp
00001 #include "mbed.h" 00002 00003 //all this does is set up the lcd and write a bunch of 9s to it 00004 00005 int main() 00006 { 00007 Serial debug(P0_2, P0_3); 00008 debug.baud(115200); 00009 printf("hi\r\n"); 00010 00011 DigitalOut* outRst = new DigitalOut(P0_19); 00012 00013 SPI* spi1 = new SPI(P0_9, P0_8, P0_7); 00014 DigitalOut* lcdUnk0 = new DigitalOut(P0_5); 00015 DigitalOut* lcdUnk1 = new DigitalOut(P2_6); 00016 DigitalOut* lcdCs = new DigitalOut(P2_7); 00017 DigitalOut* lcdRefresh = new DigitalOut(P1_28); 00018 00019 *lcdCs = true; 00020 *lcdRefresh = false; 00021 *lcdUnk0 = true; 00022 *lcdUnk1 = false; 00023 00024 PwmOut* lcdClock = new PwmOut(P1_26); 00025 lcdClock->period((float)1/80000); 00026 lcdClock->pulsewidth((float)1/80000*0.9); 00027 00028 wait(1); 00029 00030 *lcdCs = false; 00031 for(int i = 0; i < 24; i++) 00032 { 00033 spi1->write('9'); 00034 } 00035 spi1->write(0); 00036 spi1->write(' '); 00037 spi1->write(' '); 00038 spi1->write(' '); 00039 00040 *lcdRefresh = true; 00041 wait_ms(1); 00042 *lcdRefresh = false; 00043 *lcdCs = true; 00044 }
Generated on Tue Jul 19 2022 19:16:15 by
1.7.2