enable all periph clocks by default on startup, added testing synchronous uart write command

This commit is contained in:
2018-01-13 12:30:17 +01:00
parent 29264540f7
commit 8852f9f8b4
4 changed files with 51 additions and 54 deletions
-13
View File
@@ -296,12 +296,6 @@ static error_t USPI_init(Unit *unit)
configure_gpio_alternate(spi_portname, pin_miso, af_spi);
configure_gpio_alternate(spi_portname, pin_sck, af_spi);
if (priv->periph_num == 1) {
__HAL_RCC_SPI1_CLK_ENABLE();
} else {
__HAL_RCC_SPI2_CLK_ENABLE();
}
// configure SSN GPIOs
{
// Claim all needed pins
@@ -346,14 +340,7 @@ static void USPI_deInit(Unit *unit)
// de-init the pins & peripheral only if inited correctly
if (unit->status == E_SUCCESS) {
assert_param(priv->periph);
LL_SPI_DeInit(priv->periph);
if (priv->periph_num == 1) {
__HAL_RCC_SPI1_CLK_DISABLE();
} else {
__HAL_RCC_SPI2_CLK_DISABLE();
}
}
// Release all resources