Skip to content

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

Merged
merged 6 commits into from
Apr 30, 2018
Merged

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Mar 15, 2018

Tests still needs to be written (To be implemented in that section)

@SenRamakri Please review.

Copy link
Contributor

@SenRamakri SenRamakri left a 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.

Copy link
Contributor

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.

Copy link
Contributor Author

@0xc0170 0xc0170 Mar 20, 2018

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

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 20, 2018

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 Functions to implement: to point to the header file.

That should answer documenting API.

What else is missing here?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 3, 2018

How can I help to make this in? Is there anything outstanding?

@@ -1,25 +1,50 @@
<h3 id="quadspi-port">QuadSPI</h3>
Copy link
Contributor

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?

Copy link
Contributor Author

@0xc0170 0xc0170 Apr 9, 2018

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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).

Copy link
Contributor Author

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"]
}
```

Copy link
Contributor

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.

Copy link
Contributor Author

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) ?

Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

0xc0170 and others added 4 commits April 9, 2018 13:07
- use device_has to enable it
- add API to be ported
Copy edit file for active voice and inclusion of articles.
@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 9, 2018

Rebased, conflicts resolved

Add link to class reference.
@0xc0170
Copy link
Contributor Author

0xc0170 commented Apr 17, 2018

Is there anything else I can help with to make this ready?

@AnotherButler
Copy link
Contributor

@SenRamakri Is this OK to merge?


### Testing

[Include testing information here.]
To be implemented
Copy link
Contributor

@SenRamakri SenRamakri Apr 17, 2018

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?

Copy link
Contributor Author

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.
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in cefda8b

@AnotherButler AnotherButler merged commit 576444d into ARMmbed:new_engine Apr 30, 2018
AnotherButler pushed a commit that referenced this pull request May 1, 2018
Add content from PR #454 to live site after reviewing on test site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants