Hi! I have to disagree here. 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. IMO it is *possible* to merge into board.h and omit periph_conf.h to make it more clear. The only argument for keeping it seperate would be the re-usaility of periph_conf.h, on the other hand a board_common.h could be created and re-used as well.
More opinions? Robert On 8/27/18 2:18 PM, smlng wrote: > 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 <gu...@schorcht.net> 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]: s...@mlng.net > [code]: https://github.com/smlng > > > _______________________________________________ > devel mailing list > devel@riot-os.org > https://lists.riot-os.org/mailman/listinfo/devel > -- Robert Hartung, M.Sc. Technische Universität Braunschweig Institut für Betriebssysteme und Rechnerverbund Mühlenpfordtstr. 23, Raum 115 38106 Braunschweig Fon: +49 (531) 391 - 3264 Fax: +49 (531) 391 - 5936 E-Mail: hart...@ibr.cs.tu-bs.de
signature.asc
Description: OpenPGP digital signature
_______________________________________________ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel