X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstmf0%2Fao_spi_stm.c;h=04827cf72c6ee92c8e46bf072690f1a472ff6dfd;hp=d83f06580380014fb0a09583ee276e9b19dc5b49;hb=48e0da4b2d1568f9f29058def12dc32d1cff3586;hpb=18e24df0353c78ada8cc1d2439729bc2f2676205 diff --git a/src/stmf0/ao_spi_stm.c b/src/stmf0/ao_spi_stm.c index d83f0658..04827cf7 100644 --- a/src/stmf0/ao_spi_stm.c +++ b/src/stmf0/ao_spi_stm.c @@ -451,8 +451,8 @@ ao_spi_config(uint8_t spi_index, uint32_t speed) (1 << STM_SPI_CR1_SPE) | /* Enable SPI unit */ (speed << STM_SPI_CR1_BR) | /* baud rate to pclk/4 */ (1 << STM_SPI_CR1_MSTR) | - (0 << STM_SPI_CR1_CPOL) | /* Format 0 */ - (0 << STM_SPI_CR1_CPHA)); + (AO_SPI_CPOL(spi_index) << STM_SPI_CR1_CPOL) | /* Format */ + (AO_SPI_CPHA(spi_index) << STM_SPI_CR1_CPHA)); } uint8_t