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
- Committer:
- va009039
- Date:
- 2016-03-08
- Revision:
- 1:4ff199bddbc1
- Child:
- 2:e3c085ac77f1
File content as of revision 1:4ff199bddbc1:
// main.cpp 2016/3/8 #include "mbed.h" #include "SimpleSerial.h" #include "Memory.h" #include "BaseEmuISP.h" SimpleSerial uart(USBTX, USBRX); #if defined(TARGET_LPC1768)||defined(TARGET_LPC4088) SimpleSerial dbg(p9, p10); #elif defined(TARGET_NUCLEO_L152RE)||defined(TARGET_NUCLEO_F103RB) SimpleSerial dbg(PB_10, PB_11); #endif Memory mem(4096, 1024, 0x10000000); class emuISP : public BaseEmuISP { virtual int Getch() {return uart.readable() ? uart.getc() : -1;} virtual void Putch(int c) {uart.putc(c);} virtual void DebugPutch(int c) {dbg.putc(c);} virtual int Part() { return 0x00008242; } // LPC824M201JDH20 virtual void WriteData(int addr, int c) {mem.Write(addr, c);} virtual int ReadData(int addr) {return mem.Read(addr);} virtual void CopyData(int dst, int src, int count) {mem.Copy(dst, src, count);} } isp; int main() { uart.baud(9600); isp.Reset(); for(;;) { isp.Poll(); } }