Skip to content

How to use SPI_DT_SPEC_GET? #44490

Answered by erwango
KenthJohan asked this question in Q&A
Apr 3, 2022 · 1 comments · 12 replies
Discussion options

You must be logged in to vote

SPI_DT_SPEC_GET should actually be applied to a SPI device (sensor, ...) and not a SPI bus (spi1 in your case):

Cf:

 * @param node_id Devicetree node identifier for the SPI device whose
 *                struct spi_dt_spec to create an initializer for
 * @param operation_ the desired @p operation field in the struct spi_config
 * @param delay_ the desired @p delay field in the struct spi_config's
 *               spi_cs_control, if there is one
 */
#define SPI_DT_SPEC_GET(node_id, operation_, delay_)		     \

To use this macro, you should add such device in your dts description.

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@erwango
Comment options

erwango Apr 5, 2022
Collaborator

@KenthJohan
Comment options

@erwango
Comment options

erwango Apr 6, 2022
Collaborator

@KenthJohan
Comment options

@erwango
Comment options

erwango Apr 7, 2022
Collaborator

Answer selected by KenthJohan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants