Update library to latest

This includes fixes for peripheral resets, introduced by library
changes:
* b3bdf025d7 stm32: i2c: drop i2c_reset()
* df654d7f28 stm32: spi: drop spi_reset()

Fixes: https://github.com/libopencm3/libopencm3-examples/issues/240
This commit is contained in:
Karl Palsson
2023-01-16 20:39:31 +00:00
parent 9577cd71eb
commit 15637e291b
6 changed files with 6 additions and 6 deletions

View File

@@ -59,7 +59,7 @@ static void spi_setup(void) {
GPIO6);
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
spi_reset(SPI1);
rcc_periph_reset_pulse(RST_SPI1);
/* Set up SPI in Master mode with:
* Clock baud rate: 1/64 of peripheral clock frequency

View File

@@ -84,7 +84,7 @@ static void spi_setup(void) {
GPIO6);
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
spi_reset(SPI1);
rcc_periph_reset_pulse(RST_SPI1);
/* Explicitly disable I2S in favour of SPI operation */
SPI1_I2SCFGR = 0;

View File

@@ -94,7 +94,7 @@ static void spi_setup(void) {
GPIO6);
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
spi_reset(SPI1);
rcc_periph_reset_pulse(RST_SPI1);
/* Explicitly disable I2S in favour of SPI operation */
SPI1_I2SCFGR = 0;

View File

@@ -59,7 +59,7 @@ static void spi_setup(void) {
GPIO6);
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
spi_reset(SPI1);
rcc_periph_reset_pulse(RST_SPI1);
/* Set up SPI in Master mode with:
* Clock baud rate: 1/64 of peripheral clock frequency

View File

@@ -53,7 +53,7 @@ static void i2c_setup(void)
rcc_periph_clock_enable(RCC_GPIOB);
rcc_set_i2c_clock_hsi(I2C1);
i2c_reset(I2C1);
rcc_periph_reset_pulse(RST_I2C1);
/* Setup GPIO pin GPIO_USART2_TX/GPIO9 on GPIO port A for transmit. */
gpio_mode_setup(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO6 | GPIO7);
gpio_set_af(GPIOB, GPIO_AF4, GPIO6 | GPIO7);