Access current SPI configuration

Posts: 1
Joined: Wed Jun 12, 2019 1:10 am

Access current SPI configuration

Postby dave93cab » Wed Jun 12, 2019 1:15 am

I can't see an easy way of getting the current configurationof an SPI host. Obviously my program should know what it set up I get that but I am writing in C++ and have classes that I would like for example to check if SPI bus is initialized, if it is that the pin configuration matches, if it isn't, initialize it etc.

It seems that there is a struct spi_host_t in spi_master.c and an array containing the 3 hosts, but the struct is declared in the C file, not the header. Is there a way of accessing this information, or plans to include it in the future?


Who is online

Users browsing this forum: Bing [Bot], dmlee05a and 12 guests