Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pBuffer increment size. #11

Merged
merged 1 commit into from
Apr 10, 2020
Merged
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
8 changes: 4 additions & 4 deletions w25qxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ void W25qxx_WriteSector(uint8_t *pBuffer ,uint32_t Sector_Address,uint32_t Offs
W25qxx_WritePage(pBuffer,StartPage,LocalOffset,BytesToWrite);
StartPage++;
BytesToWrite-=w25qxx.PageSize-LocalOffset;
pBuffer+=w25qxx.PageSize;
pBuffer += w25qxx.PageSize - LocalOffset;
LocalOffset=0;
}while(BytesToWrite>0);
#if (_W25QXX_DEBUG==1)
Expand Down Expand Up @@ -699,7 +699,7 @@ void W25qxx_WriteBlock (uint8_t* pBuffer ,uint32_t Block_Address ,uint32_t Offs
W25qxx_WritePage(pBuffer,StartPage,LocalOffset,BytesToWrite);
StartPage++;
BytesToWrite-=w25qxx.PageSize-LocalOffset;
pBuffer+=w25qxx.PageSize;
pBuffer += w25qxx.PageSize - LocalOffset;
LocalOffset=0;
}while(BytesToWrite>0);
#if (_W25QXX_DEBUG==1)
Expand Down Expand Up @@ -845,7 +845,7 @@ void W25qxx_ReadSector(uint8_t *pBuffer,uint32_t Sector_Address,uint32_t Offset
W25qxx_ReadPage(pBuffer,StartPage,LocalOffset,BytesToRead);
StartPage++;
BytesToRead-=w25qxx.PageSize-LocalOffset;
pBuffer+=w25qxx.PageSize;
pBuffer += w25qxx.PageSize - LocalOffset;
LocalOffset=0;
}while(BytesToRead>0);
#if (_W25QXX_DEBUG==1)
Expand Down Expand Up @@ -884,7 +884,7 @@ void W25qxx_ReadBlock(uint8_t* pBuffer,uint32_t Block_Address,uint32_t OffsetIn
W25qxx_ReadPage(pBuffer,StartPage,LocalOffset,BytesToRead);
StartPage++;
BytesToRead-=w25qxx.PageSize-LocalOffset;
pBuffer+=w25qxx.PageSize;
pBuffer += w25qxx.PageSize - LocalOffset;
LocalOffset=0;
}while(BytesToRead>0);
#if (_W25QXX_DEBUG==1)
Expand Down