Hi Robert,

On 8/27/18 3:37 PM, Robert Hartung wrote:
> While the peripherals belong to the MCU
> hardware-wise, the actual board might limit the available
> configurations, as pins might be used as GPIOs, and the peripherals
> might not be available. Therefore it would also belong to the board.h.

There's another layer: the application.

board.h should define hard-wired stuff (LEDs, stuff that is actually
hard-defined by the board). periph_conf.h contains a (default)
"peripheral configuration" that an application might want to (and almost
always does) override.

One problem is that much here is not entirely clear. E.g., some Nucleos
have an LED on an also exposed IO pin, or boards can be run with both
internal and external OSC, or SAMR21-XPRO have an integrated at86rf233
hard-wired to an SPI, so all "boards" using that CPU should configure
that SPI if but only if that RF chip is used by the application.

Also, some stuff is actually difficult to express nicely with C.

Usually for every piece of configuration, you'll find arguments to move
it somewhere else. But usually, the next place is just a different
trade-off.

Currently, we're trying for uniformity and consistency, so as soon as a
location is determined, it is at least the same for all boards.

Kaspar
_______________________________________________
devel mailing list
[email protected]
https://lists.riot-os.org/mailman/listinfo/devel

Reply via email to