2
2
3
3
## Description
4
4
5
- This updates targets the SPI HAL as the first step of a wide plan for all HAL APIs.
5
+ This update targets the SPI HAL as the first step of a wide plan for all HAL APIs.
6
6
7
7
## Motivation
8
8
@@ -137,7 +137,7 @@ void spi_free(spi_t *obj);
137
137
- At least a symbol width of 8bit must be supported.
138
138
- The supported frequency range must include the range [0.2..2] MHz.
139
139
- The shortest part of the duty cycle must not be shorter than 50% of the expected period.
140
- - `spi_init()` initializes the pins.
140
+ - `spi_init()` initializes the pins leaving the configuration registers unchanged.
141
141
- `spi_init()` ignores the `SS` pin if `is_slave` is false.
142
142
- `spi_free()` resets the pins to their default state.
143
143
- `spi_free()` disables the peripheral clock.
@@ -149,8 +149,11 @@ void spi_free(spi_t *obj);
149
149
2. Clock idle state is *high*, data are sampled when the clock becomes *active* (polarity = 1, phase = 0)
150
150
3. Clock idle state is *high*, data are sampled when the clock becomes *inactive* (polarity = 1, phase = 1)
151
151
- the bit ordering (lsb/msb first).
152
+ - `spi_format()` updates the configuration of the peripheral except the baud rate generator.
152
153
- `spi_frequency()` sets the frequency to use during the transfer.
153
154
- `spi_frequency()` returns the actual frequency that will be used.
155
+ - `spi_frequency()` updates the baud rate generator leaving other configurations unchanged.
156
+ - `spi_init()`, `spi_frequency()` and `spi_format()` must be called at least once each before initiating any transfer.
154
157
- `spi_transfer()` :
155
158
- writes `tx_len` symbols to the bus.
156
159
- reads `rx_len` symbols from the bus.
0 commit comments