Comments (3)
@fresird, Thanks for notice
from stm32-w25q-qspi.
Hi @Crazy-Geeks , Thanks you for your great W25Q library.
I find if I write 256 bytes with pageShift == 0, W25Q_ProgramData return W25Q_PARAM_ERR.
I changed 255 to 256, and It works very well.
W25Q_STATE W25Q_ProgramData(uint8_t* buf, uint16_t len, uint8_t pageShift, uint32_t pageNum)
{
/*
if (pageNum >= PAGE_COUNT || len == 0 || len > 256 || pageShift > 255 - len
|| (pageShift > 0 && pageNum >= PAGE_COUNT - 1))
return W25Q_PARAM_ERR;
*/
if (pageNum >= PAGE_COUNT || len == 0 || len > 256 || pageShift > 256 - len
|| (pageShift > 0 && pageNum >= PAGE_COUNT - 1))
return W25Q_PARAM_ERR;
uint32_t rawAddr = page_to_addr(pageNum, pageShift);
return W25Q_ProgramRaw(buf, len, rawAddr);
}
from stm32-w25q-qspi.
@fresird I haven't tested it well, so I've missed this error, I'll fix this.
If you find bugs later - create pull request, please
from stm32-w25q-qspi.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32-w25q-qspi.