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:
@@ -59,7 +59,7 @@ static void spi_setup(void) {
|
|||||||
GPIO6);
|
GPIO6);
|
||||||
|
|
||||||
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
|
/* 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:
|
/* Set up SPI in Master mode with:
|
||||||
* Clock baud rate: 1/64 of peripheral clock frequency
|
* Clock baud rate: 1/64 of peripheral clock frequency
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ static void spi_setup(void) {
|
|||||||
GPIO6);
|
GPIO6);
|
||||||
|
|
||||||
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
|
/* 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 */
|
/* Explicitly disable I2S in favour of SPI operation */
|
||||||
SPI1_I2SCFGR = 0;
|
SPI1_I2SCFGR = 0;
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static void spi_setup(void) {
|
|||||||
GPIO6);
|
GPIO6);
|
||||||
|
|
||||||
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
|
/* 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 */
|
/* Explicitly disable I2S in favour of SPI operation */
|
||||||
SPI1_I2SCFGR = 0;
|
SPI1_I2SCFGR = 0;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ static void spi_setup(void) {
|
|||||||
GPIO6);
|
GPIO6);
|
||||||
|
|
||||||
/* Reset SPI, SPI_CR1 register cleared, SPI is disabled */
|
/* 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:
|
/* Set up SPI in Master mode with:
|
||||||
* Clock baud rate: 1/64 of peripheral clock frequency
|
* Clock baud rate: 1/64 of peripheral clock frequency
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ static void i2c_setup(void)
|
|||||||
rcc_periph_clock_enable(RCC_GPIOB);
|
rcc_periph_clock_enable(RCC_GPIOB);
|
||||||
rcc_set_i2c_clock_hsi(I2C1);
|
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. */
|
/* 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_mode_setup(GPIOB, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO6 | GPIO7);
|
||||||
gpio_set_af(GPIOB, GPIO_AF4, GPIO6 | GPIO7);
|
gpio_set_af(GPIOB, GPIO_AF4, GPIO6 | GPIO7);
|
||||||
|
|||||||
Submodule libopencm3 updated: 3b89fc5999...88e91c9a7c
Reference in New Issue
Block a user