Skip to content

Commit

Permalink
Merge PR matrix-io#36 (Fix sector_size for M25P64, ID 0x2017)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielO committed Oct 5, 2022
2 parents c5454a2 + d2470e5 commit 900349d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions bitfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Dmitry Teytelman [[email protected]] 14 Jun 2006 [applied 13 Aug 2006]:
#include <time.h>
#include "bitrev.h"

using namespace std;

BitFile::BitFile()
: length(0)
, buffer(0)
Expand Down Expand Up @@ -607,14 +605,14 @@ uint32_t BitFile::saveAs(FILE_STYLE style, const char *device,
return clip;
}

void BitFile::error(const string &str)
void BitFile::error(const std::string &str)
{
errorStr=str;
Error=true;
fprintf(logfile,"%s\n",str.c_str());
}

void BitFile::readField(string &field, FILE *fp)
void BitFile::readField(std::string &field, FILE *fp)
{
byte t[2];
fread(t,1,2,fp);
Expand Down
1 change: 1 addition & 0 deletions cablelist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ sysfsgpio_creator sysfsgpio_creator 0 NULL
sysfsgpio_voice sysfsgpio_voice 0 NULL
matrix_creator matrix_creator 0 NULL
matrix_voice matrix_voice 0 NULL
mimas_a7 ftdi 15000000 0x2A19:0x1009::2:0x00:0x4B:0x00:0x00
2 changes: 2 additions & 0 deletions devlist.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# IDCODE IR_len ID_Cmd Text

03631093 6 0x09 XA7A100T
0362e093 6 0x09 XC7A15T
0362D093 6 0x09 XC7A35T
0362C093 6 0x09 XC7A50T
03632093 6 0x09 XC7A75T
03636093 6 0x09 XC7A200T

Expand Down
2 changes: 1 addition & 1 deletion progalgspiflash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ int ProgAlgSPIFlash::spi_flashinfo_m25p_mx25l(unsigned char *buf, int is_mx25l)
break;
case 0x17:
pages = 32768;
sector_size = 131072; /* Bytes = 1 Mi Bit*/
sector_size = 65536; /* Bytes = 512k Bits*/
break;
case 0x18:
pages = 65536;
Expand Down
2 changes: 0 additions & 2 deletions srecfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Modifyied from srecdec
#include <string.h>
#include <stdlib.h>

using namespace std;

int SrecFile::DecodeSRecordLine(char *source, unsigned char *dest, S_Record *SRec)
{
char buffer[16];
Expand Down

0 comments on commit 900349d

Please sign in to comment.