Skip to content

Changing device config in runtime #61406

Closed Answered by yashi
robertkowalewski asked this question in Q&A
Discussion options

You must be logged in to vote

If you are not using the values from devicetree, you can just use plain i2c functions (without _dt suffix).
For spi_write_dt(), there is spi_write(), which takes dev, config, and tx_bufs. struct spi_config, or spi_cs_control within it, is what you need to check.

https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/drivers/spi.h#L284-L315

You can pass your spi_config to your spi device how to operate.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@robertkowalewski
Comment options

Answer selected by robertkowalewski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: SPI SPI bus
2 participants