IJFW - IchigoJamのBASICプログラムをメモリカード(MMCまたは互換カード)に保存したり読み出したりできるプログラム。メモリカードにファームウェアのファイルを置くだけで、電源ON時に自動的に書き換える機能も搭載(一応こちらがメイン)。LPC1114FN28専用。

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers UartIspBase.h Source File

UartIspBase.h

00001 #ifndef UART_ISP_BASE_H
00002 #define UART_ISP_BASE_H
00003 
00004 
00005 class UartIspBase {
00006 public:
00007 
00008     UartIspBase();
00009     virtual ~UartIspBase();
00010 
00011     virtual void writeSerial(const char val) = 0;
00012     virtual char readSerial() = 0;
00013     virtual int readable() = 0;
00014     virtual void sleep(int msec) = 0;
00015     
00016 protected:
00017 
00018     void disableEchoBack();
00019     int openIsp(int mcufreq);
00020     int unlockFlash();
00021     int eraseFlash(int startSector, int endSector);
00022     int writeToRam(char buffer[], unsigned int ramAddress, int length);
00023     int prepareFlash(int startSector, int endSector);
00024     int copyToFlash(unsigned int flashAddress, unsigned int ramAddress, int length);
00025 
00026 private:
00027 
00028     char uuCharTable[64];
00029     int echoBack;
00030 
00031     char getUuString(int i);
00032     void writeString(const char val);
00033     void writeString(const char* str);
00034     int isRecieveStringMatch(const char* checkString);
00035 
00036 };
00037 #endif