-
Notifications
You must be signed in to change notification settings - Fork 167
Add File::availableForWrite API #68
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
Add File::availableForWrite API #68
Conversation
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: 67138c70-c50a-11e9-8712-75d78f9b457f |
src/utility/Sd2Card.cpp
Outdated
if (cardCommand(CMD13, 0) || spiRec()) { | ||
error(SD_CARD_ERROR_WRITE_PROGRAMMING); | ||
goto fail; | ||
if (sync) { |
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.
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.
We should take extra care and understand how people really use this library (like continuous blocking writes or other patterns).
Said that, I love this patch!
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.
I think we can only activate this non-blocking behaviour if someone calls availableForWrite()
. This will allow older sketches to continue with the existing code path.
Stay tuned, I'll push some more changes later today.
Regarding the Travis CI issue, I have verified that it is fixed by #67. That could be merged now if you want to get the CI tests working again. |
062fd7c
to
287d50c
Compare
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: 300f1130-c5bf-11e9-8aae-f1e5ed08699b |
287d50c
to
21ec876
Compare
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: cd2a1270-c5c0-11e9-8aae-f1e5ed08699b |
21ec876
to
d845814
Compare
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: 0fb146e0-c5cb-11e9-8aae-f1e5ed08699b |
d845814
to
82e3bf9
Compare
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: 43272570-c5cc-11e9-8aae-f1e5ed08699b |
Hey @sandeepmistry, TravisCI finished with status TravisBuddy Request Identifier: e86a84d0-c5dd-11e9-8aae-f1e5ed08699b |
This is ready for review now :) |
This can allow sketches to see if the write will be non-blocking.