[riot-devel] SPI automatic interface configuration inside of cpu.c/periph_init(();

Neo neo at nenaco.de
Sat Apr 29 14:56:57 CEST 2017


Dear RIOT developers,

I think it is not a good idea to initilialize the SPI interface 
automatically via the periph_init() function because it is not as static 
as mentioned.

In my application I have 2 SPI interfaces defined in the periph_conf.h 
file - but I wanted only to configure the second one of these interfaces.

I the older days everything went well, but when I pulled in the new 
sources I was wondering why now the spi_init() function was invoked 3 
times....2 times automatically by the periph_init() function 
(initializing all defined interfaces) and one time by my own 
(initializing only the second interface).....and it took some time to 
find out what was going wrong.

For my opinion interface initialization should be under control of the 
application which interface is set up.

Best regards,

Neo



More information about the devel mailing list