-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Nonblocking w25n01g code tidy up #13562
Nonblocking w25n01g code tidy up #13562
Conversation
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
can you merge upstream/master, please? it should remove conflicts |
went fly this ( |
@SteveCEvans , this branch has merge conflicts. merging master (or rebase) will fix. |
5cdae1b
to
28d2f5b
Compare
commit 6837ed2 needs closing |
6837ed2
to
12d171e
Compare
Yup, rather daft copy-n-paste error! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding my approval for workflow, but hoping others will deep-inspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small log using 8K logging:
@ledvinap please test |
{.u.buffers = {readStatus, readyStatus}, sizeof(readStatus), true, w25n01g_callbackReady}, | ||
{.u.buffers = {writeEnable, NULL}, sizeof(writeEnable), true, w25n01g_callbackWriteEnable}, | ||
{.u.buffers = {progExecCmd, NULL}, sizeof(progExecCmd), true, w25n01g_callbackWriteComplete}, | ||
{.u.buffers = {progExecDataLoad, NULL}, sizeof(progExecDataLoad), false, NULL}, | ||
{.u.link = {NULL, NULL}, 0, true, NULL}, | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(maybe it would be more readable if command buffers were closer to segments (intermix them) )
@@ -353,7 +353,10 @@ bool w25n01g_identify(flashDevice_t *fdevice, uint32_t jedecID) | |||
fdevice->couldBeBusy = true; // Just for luck we'll assume the chip could be busy even though it isn't specced to be | |||
fdevice->vTable = &w25n01g_vTable; | |||
|
|||
#ifndef USE_QUADSPI | |||
// Need to set clock speed for 8kHz logging support with SPI | |||
spiSetClkDivisor(fdevice->io.handle.dev, spiCalculateDivider(100000000)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fdevice->io.handle.dev
union member is used, but device can be in quad/octo mode.
if (fdevice->io.mode == FLASHIO_SPI) {
@SteveCEvans : I'd also pass segment index and busSegment_t* to callback (making it common for whole chain) and add flags to each buffers[] entry(skip, possibly last, etc), but that is personal preference ...
|
Follow on from #13555