Hi Gunar,

in `periph_conf.h` we configure all the MCU/CPU peripherals, i.e., SPI, I2C bus 
and so on,
these are typically not bound to a board. On the other hand, in `board.h` we 
configure all
board specific stuff, like for instance LEDs which are not part of the MCU. 
While LEDs also
need a certain GPIO pin to be configured, you can connect an LED to any (free) 
GPIO while
peripheral busses are bound to certain pins on most MCUs - except for, e.g. TIs 
CC2538.

However, you're right it is (in parts) a bit confusing what to configure where 
(and why).

> On 27. Aug 2018, at 14:02, Gunar Schorcht <[email protected]> wrote:
> 
> Signed PGP part
> Hi,
> 
> I'm trying again to sort the definitions of board configurations. I feel
> like doing this for the tenth time.
> 
> I have taken a look at many board.h, periph_conf.h, board_common.h and
> periph_conf_common.h files for different platforms, eg., Arduino*,
> Nucleo*, IoTlab, ...
> 
> The difference between *.h and their *_common.h counterparts is qute clear.
> 
> However, I'm still unsure what the difference between board.h and
> periph_conf.h is. For example, LED pins are mostly defined in board.h
> while the definition of the of I2C or SPI pins are defined in
> periph_conf.h. What exactly makes the difference, LED pins as well as
> I2C or SPI pins are determined by the board.
> 
> So the question is, what belongs in board.h and what in periph_conf.h?
> Are there any rules or guidelines.
> 
> Regards
> Gunar
> 
> --
> Wenn du laufen willst, lauf eine Meile. Wenn du ein neues Leben
> kennenlernen willst, dann lauf Marathon. (Emil Zatopek)
> 
> 
> 
Cheers,
  Sebastian

[mail]: [email protected]
[code]: https://github.com/smlng

Attachment: signature.asc
Description: Message signed with OpenPGP

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

Reply via email to