diff options
| author | David P <dpoirier@y7mail.com> | 2021-06-12 14:53:44 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-07-18 11:23:41 +1000 |
| commit | f365025c9c699a4a42c103b9ff01071ebc8d57c8 (patch) | |
| tree | cc36bc6703e39729274141541b00cf3f3747caca /ports/stm32/spi.c | |
| parent | fdd5b18133e9d9f5a4e76be22ece6632d11d7fee (diff) | |
stm32: Replace master/slave with controller/peripheral in I2C and SPI.
Replace "master" with "controller" and "slave" with "peripheral" in
comments, errors, and debug messages.
Add CONTROLLER and PERIPHERAL constants to pyb.SPI and pyb.I2C classes;
retain MASTER and SLAVE constants for backward compatiblity.
Diffstat (limited to 'ports/stm32/spi.c')
| -rw-r--r-- | ports/stm32/spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/stm32/spi.c b/ports/stm32/spi.c index d3b3a784e..0ce6b5abc 100644 --- a/ports/stm32/spi.c +++ b/ports/stm32/spi.c @@ -640,14 +640,14 @@ void spi_print(const mp_print_t *print, const spi_t *spi_obj, bool legacy) { #endif uint baudrate = spi_get_source_freq(spi) >> log_prescaler; if (legacy) { - mp_printf(print, ", SPI.MASTER"); + mp_printf(print, ", SPI.CONTROLLER"); } mp_printf(print, ", baudrate=%u", baudrate); if (legacy) { mp_printf(print, ", prescaler=%u", 1 << log_prescaler); } } else { - mp_printf(print, ", SPI.SLAVE"); + mp_printf(print, ", SPI.PERIPHERAL"); } mp_printf(print, ", polarity=%u, phase=%u, bits=%u", spi->Init.CLKPolarity == SPI_POLARITY_LOW ? 0 : 1, spi->Init.CLKPhase == SPI_PHASE_1EDGE ? 0 : 1, spi->Init.DataSize == SPI_DATASIZE_8BIT ? 8 : 16); if (spi->Init.CRCCalculation == SPI_CRCCALCULATION_ENABLE) { |
