-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat(spi_nand_flash): expose lower-level API and make it usable without Dhara #447
feat(spi_nand_flash): expose lower-level API and make it usable without Dhara #447
Conversation
b66eda8
to
fe2657f
Compare
8196058
to
eb3dfe2
Compare
Generally LGTM, but why do you place spi_nand_api.h into private includes? Isn't this PR about exposing the APIs? |
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.
@RathiSonika LGTM overall, looks like a nice improvement. I left a few comments for discussion.
This is actually a private header for this component. The APIs defined here are used internally within the component and are not public APIs. I understand the name might be confusing, so I’ll rename it. |
0601427
to
d83e3a6
Compare
8a0ba94
to
c2fd329
Compare
@igrr PTAL. Thank you! |
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.
Some final comments, LGTM otherwise.
86bceb9
to
dedb5e8
Compare
ab1e619
to
eb4e40c
Compare
spi_nand_flash
└── src
├── nand.c : Defines all public interfaces; includes definitions for spi_nand_flash.h
├── nand_gigadevice.c : Initializes chip-specific settings for GigaDevice
├── nand_micron.c : Initializes chip-specific settings for Micron
├── nand_winbond.c : Initializes chip-specific settings for Winbond
├── nand_alliance.c : Initializes chip-specific settings for Alliance
├── spi_nand_oper.c : Contains lower-level SPI communication APIs
├── nand_impl.c : Implements lower-level APIs such as nand_erase, nand_mark_bad, nand_prog, etc.
├── nand_impl_wrap.c : Implements wrapper functions for lower-level APIs implemented in nand_impl.c
└── dhara_glue.c : Initializes and defines Dhara-related APIs and registers function pointers in nand.c. Only
dhara_glue.c depends on the Dhara library, making it easy to replace with another library if
needed, allowing the code to function independently of Dhara.
Refactoring nand.c and the chip-specific settings is possible; however, this PR primarily focuses on exposing lower-level APIs and enabling easy replacement of the Dhara library in the future, if needed.
Checklist
Change description