-
Notifications
You must be signed in to change notification settings - Fork 178
QSPI: add contributing guide #454
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
Conversation
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.
This is good start, please add more documentation around APIs.
[Include implementation information here.] | ||
The target needs to define `qspi_s` structure - target specific QSPI object, enable QSPI in targets.json file `device_has` and implement QSPI HAL functions defined in `hal/qspi_api.h` header file. | ||
|
||
`qspi_write` and `qspi_read` are used for data transfers. For communicating with device, `qspi_command_transfer` should be used. | ||
|
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.
This is a good start, please add detailed documentation for each API. Also mention how the peripheral is configured, (like different operating modes, and what's supported with this implementation) and I would also like to see more info around what switches needs to be used in json files to configure this feature.
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.
The API is documented in the header file, do we duplicate it here as well? I dont think so (neither can find anywhere in this contribution folder this ). I would expect the API to be documented in the header file (not certain what else we could add here about the functions) and we can share the pointer here
Also mention how the peripheral is configured, (like different operating modes, and what's supported with this implementation) and I would also like to see more info around what switches needs to be used in json files to configure this feature.
I'll add some info
I pushed an update. I would like to reference qspi header file (similar to what RTC porting guide does). @AnotherButler Can you help? This is what I would like to have here : https://github.com/ARMmbed/Handbook/blob/new_engine/docs/reference/contributing/target/rtc.md#implementing-the-rtc-api. I would then replace That should answer documenting API. What else is missing here? |
How can I help to make this in? Is there anything outstanding? |
@@ -1,25 +1,50 @@ | |||
<h3 id="quadspi-port">QuadSPI</h3> |
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.
Sometimes, we use "QuadSPI," and sometimes we use "QSPI". Which is the API in the code?
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.
QSPI is an object in the drivers API The full name should be Quad Serial Peripheral Interface.
This then should be changed to QSPI?
Note: the name of the file is QuadSPI , also here in the port it is as it was. So which naming we should use?
@@ -1,25 +1,50 @@ | |||
<h3 id="quadspi-port">QuadSPI</h3> | |||
|
|||
[Include a brief description here.] | |||
The QSPI HAL defines API for targets that contain QSPI capable peripheral. Developers often use the QSPI interface for data storage. |
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.
The QSPI HAL defines API for targets? What does this mean? Please clarify.
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.
Fixed
|
||
##### Undefined behavior | ||
|
||
[Include any undefined behavior in bullet format here.] | ||
- Calling any function other than `qspi_init` before the initialization of the QSPI. | ||
|
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.
Please add a "Notes" section with any common trouble areas developers may come across when implementing this API (if applicable).
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.
Not yet, will be filled later once we get more targets and questions about the porting
"TARGET_NAME": { | ||
"device_has": ["QSPI"] | ||
} | ||
``` | ||
|
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.
Query: Is this on master? If so, please link to its Doxy on master. Then link to its Doxy on the feature branch. If not, please link only to the Doxy on the feature branch.
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.
Not on master, only on feature branch. how to link (an example) ?
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.
Ah. If it's not on master, then the link toward the top of this section is the correct one. I'm assuming any testing pages will be on the same branch, too: https://os-doc-builder.test.mbed.com/docs/development/feature-hal-spec-qspi-doxy/annotated.html?
We generate the feature-branch Doxy from the .json. You can find the page by replacing the "mbed-os-api-doxy" of the usual Doxy URL with the slug from the .json. (You probably don't need to know how to do that. I'm just telling you in case you're curious.)
|
||
#### Testing | ||
|
||
[Include testing information here.] | ||
To be implemented |
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.
Please complete this section and add links to the Doxy tests.
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 are no tests at the moment, what shall I put in here?
- use device_has to enable it - add API to be ported
Copy edit file for active voice and inclusion of articles.
Rebased, conflicts resolved |
Add link to class reference.
Is there anything else I can help with to make this ready? |
@SenRamakri Is this OK to merge? |
|
||
### Testing | ||
|
||
[Include testing information here.] | ||
To be implemented |
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.
@0xc0170 Are we planning to expand on this "Testing" section?
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.
Yes, this should be added once the tests in the codebase (currently not implemented therefore this is empty)
@@ -1,25 +1,54 @@ | |||
<h2 id="quadspi-port">QuadSPI</h2> | |||
|
|||
[Include a brief description here.] | |||
Implementing QSPI enables Mbed OS to communicate with external memories much faster than via SPI. |
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.
@0xc0170 One outstanding item: Please expand this paragraph. What does this API do, and what are its use cases?
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.
Added in cefda8b
Add content from PR #454 to live site after reviewing on test site.
Tests still needs to be written (To be implemented in that section)
@SenRamakri Please review.