|
34 | 34 | * low-power mode to save energy.
|
35 | 35 | *
|
36 | 36 | * The SPI unit's initialization is split into 3 parts:
|
37 |
| - * 1. `spi_init()` should be called once for each SPI unit defined by a board |
38 |
| - * during system initialization. |
| 37 | + * 1. The SPI buses are automatically initialized during boot according to the |
| 38 | + * specification in board's `periph_conf.h`. (The exact format depends on the |
| 39 | + * MCU used.) See @ref spi_init for details. |
39 | 40 | * 2. `spi_init_cs()` should be called during device driver initialization, as
|
40 | 41 | * each chip select pin/line is used uniquely by a specific device, i.e. chip
|
41 | 42 | * select lines are no shared resource.
|
@@ -198,14 +199,17 @@ typedef enum {
|
198 | 199 | * MISO, MOSI, and CLK pins. After initialization, the given device should be
|
199 | 200 | * in power down state.
|
200 | 201 | *
|
201 |
| - * This function is intended to be called by the board initialization code |
202 |
| - * during system startup to prepare the (shared) SPI device for further usage. |
203 |
| - * It uses the board specific initialization parameters as defined in the |
204 |
| - * board's `periph_conf.h`. |
| 202 | + * This function is called internally during system startup to prepare the |
| 203 | + * (shared) SPI device for further usage. It uses the board specific |
| 204 | + * initialization parameters as defined in the board's `periph_conf.h`. |
205 | 205 | *
|
206 | 206 | * Errors (e.g. invalid @p bus parameter) are not signaled through a return
|
207 | 207 | * value, but should be signaled using the assert() function internally.
|
208 | 208 | *
|
| 209 | + * @warning This function **MUST NOT** be called by the user unless you add |
| 210 | + * `DISABLE_MODULE += periph_init_spi` to your `Makefile`. If you |
| 211 | + * do so, call this function before any call to `spi_acquire()`, |
| 212 | + * and call no more than **once**. |
209 | 213 | * @note This function MUST not be called more than once per bus!
|
210 | 214 | *
|
211 | 215 | * @param[in] bus SPI device to initialize
|
|
0 commit comments