Skip to content
New issue

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

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

Already on GitHub? # to your account

SdFat -> FS HAL mode fixes & test #8833

Merged
merged 2 commits into from
Jan 31, 2023
Merged

Conversation

mcspr
Copy link
Collaborator

@mcspr mcspr commented Jan 27, 2023

  • re-use SdFat access mode through static const, no need to hard-code our own value w/ cast in the macro
  • separate access-modes from flags
  • simple compile-time tests in .cpp

resolve #8831

* re-use SdFat value through static const, no need to hard-code our
  values w/ cast in the macro
* separate read-modes from flags
* simple compile-time tests in .cpp

resolve esp8266#8831
@earlephilhower
Copy link
Collaborator

Does the mode change that I think I saw #8831 request break existing code and Arduino compatibility? The SD.h stuff has been untouched since #5525, over 4 years ago, pre 3.x even.

OTW, neat use of static_asserts!

@mcspr
Copy link
Collaborator Author

mcspr commented Jan 27, 2023

O_APPEND is still there (#6105)

'New' thing is O_AT_END that SdFat (and only SdFat?) did at some point.
https://github.com/greiman/SdFat/blob/628effa1c277e6dc1fef461b4b755ad300735248/src/common/ArduinoFiles.h#L35
edit: ...which we don't use anyway. so whatever :>

@d-a-v d-a-v added the alpha included in alpha release label Jan 28, 2023
Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice debug.
Reason is: upstream O_READ was 1 and now is 0 since our release v3.
Thanks

@mcspr mcspr changed the title SdFat <-> FS HAL mode fixes & test SdFat -> FS HAL mode fixes & test Jan 31, 2023
@mcspr mcspr merged commit 6dfebec into esp8266:master Jan 31, 2023
@mcspr mcspr deleted the sdfs/mode-oops branch January 31, 2023 19:28
@mcspr mcspr added this to the 3.1.2 milestone Feb 1, 2023
earlephilhower added a commit to earlephilhower/arduino-pico that referenced this pull request Feb 11, 2023
Pull in the portion of the change correcting the flag setting from
esp8266/Arduino#8833
earlephilhower added a commit to earlephilhower/arduino-pico that referenced this pull request Feb 11, 2023
Pull in the portion of the change correcting the flag setting from
esp8266/Arduino#8833
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
alpha included in alpha release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Help identifying problem using Lib EBD + CORE 3.1.0
3 participants