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

Dependencies:   mbed

参考URL http://www.cyberchabudai.org/index.php/entry?tag=IJFW

Committer:
oks486
Date:
Sun Aug 21 07:51:01 2016 +0000
Revision:
2:daf6c4719496
Parent:
1:11f73f269fdc
Modified I2c2mem for "FILES" command

Who changed what in which revision?

UserRevisionLine numberNew contents of line
oks486 1:11f73f269fdc 1 #ifndef FATFS_IJFW_CONFIGURABLE_H
oks486 1:11f73f269fdc 2 #define FATFS_IJFW_CONFIGURABLE_H
oks486 1:11f73f269fdc 3
oks486 1:11f73f269fdc 4 #include "mbed.h"
oks486 1:11f73f269fdc 5 #include "FatfsIJFW.h"
oks486 1:11f73f269fdc 6
oks486 1:11f73f269fdc 7 const int CONFIG_ITEM_NUM = 3;
oks486 1:11f73f269fdc 8 const int ITEM_NAME_LENGTH = 32;
oks486 1:11f73f269fdc 9 const int ITEM_VAL_LENGTH = 8;
oks486 1:11f73f269fdc 10
oks486 1:11f73f269fdc 11 typedef struct {
oks486 1:11f73f269fdc 12 char itemName[ITEM_NAME_LENGTH+1];
oks486 1:11f73f269fdc 13 char itemValue[ITEM_VAL_LENGTH+1];
oks486 1:11f73f269fdc 14 } ConfigItem;
oks486 1:11f73f269fdc 15
oks486 1:11f73f269fdc 16 class FatfsIjfwConfigurable : public FatfsIJFW {
oks486 1:11f73f269fdc 17 public:
oks486 1:11f73f269fdc 18 FatfsIjfwConfigurable(SPI* _spi, DigitalOut* _cs);
oks486 1:11f73f269fdc 19
oks486 1:11f73f269fdc 20 int setConfigValue(const char* itemName, const char* value);
oks486 1:11f73f269fdc 21 int getConfigValue(const char* itemName, char* buf);
oks486 1:11f73f269fdc 22 int readConfigFile(const char* configFiie);
oks486 1:11f73f269fdc 23
oks486 1:11f73f269fdc 24 int chdir(const char* dir);
oks486 1:11f73f269fdc 25 int openBas(const char* name, const FileMode mode);
oks486 1:11f73f269fdc 26 int checkFirmFile(const char* binfile);
oks486 1:11f73f269fdc 27 int deleteFirmFile(const char* binfile);
oks486 1:11f73f269fdc 28
oks486 1:11f73f269fdc 29 protected:
oks486 1:11f73f269fdc 30 void initConfigItem();
oks486 1:11f73f269fdc 31 int readLine(char* buf, int length);
oks486 1:11f73f269fdc 32
oks486 1:11f73f269fdc 33 ConfigItem configitem[CONFIG_ITEM_NUM];
oks486 1:11f73f269fdc 34
oks486 1:11f73f269fdc 35 };
oks486 1:11f73f269fdc 36
oks486 1:11f73f269fdc 37 #endif