diff --git a/Makefile b/Makefile index f8d8df5..96d0156 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ rtd_prog: main.cpp crc.o gff.o i2c.o - ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} crc.o gff.o i2c.o main.cpp -o rtd_prog + ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} crc.o gff.o i2c.o main.cpp -o rtd_prog -li2c crc.o: crc.cpp crc.h ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o crc.o crc.cpp diff --git a/i2clinux.cpp b/i2clinux.cpp index 960039b..272e328 100644 --- a/i2clinux.cpp +++ b/i2clinux.cpp @@ -6,6 +6,7 @@ extern "C" { #include + #include } static int file; diff --git a/main.cpp b/main.cpp index 5d2bada..c942c47 100644 --- a/main.cpp +++ b/main.cpp @@ -51,6 +51,8 @@ static const FlashDesc FlashDevices[] = { {"SST25VF512" , 0xBF4800, 64, 256, 32}, {"SST25VF032" , 0xBF4A00, 4 * 1024, 256, 32}, {"MX25L4005" , 0xC22013, 1024, 256, 64}, + {"T25S40" , 0x1C3113, 512, 256, 32}, + {"T25S40" , 0x5E6013, 512, 256, 32}, {NULL , 0, 0, 0, 0} }; @@ -173,6 +175,7 @@ void SetupChipCommands(uint32_t jedec_id) { uint8_t manufacturer_id = GetManufacturerId(jedec_id); switch (manufacturer_id) { case 0xEF: + case 0x5e: case 0xC2: // These are the codes for Winbond WriteReg(0x62, 0x6); // Flash Write enable op code