Skip to content

Commit

Permalink
Correct SPI state machine for disable()
Browse files Browse the repository at this point in the history
  • Loading branch information
GrumpyOldPizza committed Oct 4, 2017
1 parent 7ab6adc commit bacc184
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 3 deletions.
Binary file modified system/STM32L4xx/Lib/libstm32l432.a
Binary file not shown.
Binary file modified system/STM32L4xx/Lib/libstm32l433.a
Binary file not shown.
Binary file modified system/STM32L4xx/Lib/libstm32l476.a
Binary file not shown.
Binary file modified system/STM32L4xx/Lib/libstm32l496.a
Binary file not shown.
2 changes: 1 addition & 1 deletion system/STM32L4xx/Source/stm32l4_sai.c
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ bool stm32l4_sai_disable(stm32l4_sai_t *sai)
stm32l4_gpio_pin_configure(sai->pins.mck, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));
}

sai->state = SAI_STATE_NONE;
sai->state = SAI_STATE_INIT;

return true;
}
Expand Down
4 changes: 2 additions & 2 deletions system/STM32L4xx/Source/stm32l4_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,6 @@ bool stm32l4_spi_disable(stm32l4_spi_t *spi)
return false;
}

spi->state = SPI_STATE_NONE;

stm32l4_gpio_pin_configure(spi->pins.mosi, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));

if (spi->pins.miso != GPIO_PIN_NONE)
Expand All @@ -960,6 +958,8 @@ bool stm32l4_spi_disable(stm32l4_spi_t *spi)
stm32l4_gpio_pin_configure(spi->pins.ss, (GPIO_PUPD_NONE | GPIO_MODE_ANALOG));
}

spi->state = SPI_STATE_INIT;

return true;
}

Expand Down

0 comments on commit bacc184

Please sign in to comment.