doc/porting-boards.md: update documentation of board_init()
This commit is contained in:
parent
fc88c4c4e5
commit
ccae474cf8
@ -62,17 +62,13 @@ somewhere else then they must be added to the include path. In
|
|||||||
`Makefile.include`: `INCLUDES += -I<some>/<directory>/<path>`
|
`Makefile.include`: `INCLUDES += -I<some>/<directory>/<path>`
|
||||||
|
|
||||||
Board initialization functions are defined in `board.c`. This file must at
|
Board initialization functions are defined in `board.c`. This file must at
|
||||||
least define a `board_init()` function that is called at startup. This
|
least define a `board_init()` function that is called at startup.
|
||||||
function initializes the `CPU` by calling`cpu_init()` among others. It is run
|
It is run before the scheduler is started, so it must not block (e.g. by
|
||||||
before the scheduler is started, so it must not block (e.g. by performing I2C
|
performing I2C operations).
|
||||||
operations).
|
|
||||||
|
|
||||||
```c
|
```c
|
||||||
void board_init(void)
|
void board_init(void)
|
||||||
{
|
{
|
||||||
/* initialize the CPU core */
|
|
||||||
cpu_init();
|
|
||||||
|
|
||||||
/* initialize GPIO or others... */
|
/* initialize GPIO or others... */
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user