Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions i2clinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
extern "C"
{
#include <linux/i2c-dev.h>
#include <i2c/smbus.h>
}

static int file;
Expand Down
3 changes: 3 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}
};

Expand Down Expand Up @@ -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
Expand Down