-
Notifications
You must be signed in to change notification settings - Fork 48
libraries: SPI: Hanlde multiple SPI instances #113
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
7400c43 to
8575df2
Compare
8575df2 to
18e2da1
Compare
libraries/SPI/SPI.cpp
Outdated
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.
Pardon me, I didn't understand how I2C has any relevance here in SPI.cpp?
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.
Sorry, I verified the code but forgot to edit the comment. I'm using the structure that was originally used for I2C.
libraries/SPI/SPI.cpp
Outdated
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.
s/arduino_i2c/arduino_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.
Fixed it. Thanks.
18e2da1 to
b25521e
Compare
I'm going to put it back into draft because I have some concerns. Sorry.
ad8d4c0 to
4ce81ce
Compare
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.
@soburi nothing against this PR, but can you add more in your commit about how this change helps us/ what feature it enables? Talk about what enhancement this is bringing in basically.
Also, s/Hanlde/handle in $subject
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.
LGTM
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.
So where does the arduino-spi name come from? Are any boards already defining it using that label?
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.
It is usually define with arduino_header in zephyr/boards definitions.
This line is intended to take advantage of it if it is already defined.
And we can override with overlay in this package with defining spis property.
5aa3007 to
bc7cf72
Compare
@soburi nothing against this PR, but can you add more in your commit about how this change helps us/ what feature it enables? Talk about what enhancement this is bringing in basically.
Added description to commit message.
Also, s/Hanlde/handle in $subject
Fixed it. Thank you.
Also, s/Hanlde/handle in $subject
Fixed it. Thank you.
@soburi Nope, I still see the wrong spelling in subject. https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core/pull/113/commits
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 fix above checkpatch warns @soburi .
WARNING: please, no spaces at the start of a line
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.
Was this fixed?
Can you please fix, rebase and force push if not done?
f9d18ce to
658e88c
Compare
658e88c to
6adf096
Compare
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.
Was this fixed?
Can you please fix, rebase and force push if not done?
6adf096 to
7f86ce5
Compare
Create multiple SPI instances if the `spis` array contains plural elements. Declare these as 'SPI1', 'SPI2', ..., from the second element of the array. (The first element is already declared as 'SPI'.) If `spis` is not defined but the DTS already defines `arduino-spi` and, use it to define the first SPI instance. The `arduion-spi` is usually defined with arduino_header in boards definitions. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
7f86ce5 to
62ca18d
Compare
Create multiple SPI instance if spis array contains plural elements. Declare these as 'SPI1', 'SPI2', ..., from second element of the array. (First element is already declare as 'SPI'.)