1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

doc/porting-boards.md: fix code snippets in md view

This commit is contained in:
krzysztof-cabaj 2023-01-26 14:49:54 -05:00
parent 7b75351bdd
commit 9f0cf1c384

View File

@ -221,7 +221,7 @@ The documentation must be under the proper doxygen group, you can compile the
documentation by calling `make doc` and then open the generated html file on documentation by calling `make doc` and then open the generated html file on
any browser. any browser.
@code ```c
/** /**
@defgroup boards_foo FooBoard @defgroup boards_foo FooBoard
@ingroup boards @ingroup boards
@ -241,7 +241,7 @@ any browser.
... ...
*/ */
@endcode ```
# Helper tools # Helper tools
@ -279,29 +279,28 @@ To avoid code duplication, common code across boards has been grouped in
In the case of source files this means some functions like `board_init` can be In the case of source files this means some functions like `board_init` can be
already defined in the common code. Unless having specific configurations or already defined in the common code. Unless having specific configurations or
initialization you might not need a `board.c` or `board.h`. Another common use initialization you might not need a `board.c` or `board.h`. Another common use
case is common peripheral configurations: case is common peripheral configurations, for example in the `cfg_timer_tim5.h`:
@code ```c
-\#include "cfg_timer_tim5.h" /**
+/** * @name Timer configuration
+ * @name Timer configuration * @{
+ * @{ */
+ */ static const timer_conf_t timer_config[] = {
+static const timer_conf_t timer_config[] = { {
+ { .dev = TIM5,
+ .dev = TIM5, .max = 0xffffffff,
+ .max = 0xffffffff, .rcc_mask = RCC_APB1ENR_TIM5EN,
+ .rcc_mask = RCC_APB1ENR_TIM5EN, .bus = APB1,
+ .bus = APB1, .irqn = TIM5_IRQn
+ .irqn = TIM5_IRQn }
+ } };
+};
+ #define TIMER_0_ISR isr_tim5
+#define TIMER_0_ISR isr_tim5
+ #define TIMER_NUMOF ARRAY_SIZE(timer_config)
+#define TIMER_NUMOF ARRAY_SIZE(timer_config) /** @} */
+/** @} */ ```
@endcode
If you want to use common makefiles, include them at the end of the specific If you want to use common makefiles, include them at the end of the specific
`Makefile`, e.g. for a `Makefile.features`: `Makefile`, e.g. for a `Makefile.features`: