Correct code formatting

This commit is contained in:
Jeonghyun Kim 2022-06-07 02:04:25 +09:00 committed by Xiang Xiao
parent f53792fea0
commit 4058f01faf
3 changed files with 16 additions and 11 deletions

View File

@ -133,7 +133,8 @@ int stm32l4_gpio_initialize(void);
* Name: stm32l4_spiregister
*
* Description:
* Called to register spi character driver of initialized spi device for the Nucleo-L432KC board.
* Called to register spi character driver of initialized
* spi device for the Nucleo-L432KC board.
*
****************************************************************************/

View File

@ -218,9 +218,11 @@ int board_app_initialize(uintptr_t arg)
#endif
#ifdef CONFIG_SPI_DRIVER
stm32l4_spiregister();
// driver registering must be processed in appinit.
//If called it during board_init, registering failed due to heap doesn't be initialized yet.
stm32l4_spiregister();
/* driver registering must be processed in appinit.
* If called it during board_init,
* registering failed due to heap doesn't be initialized yet.
*/
#endif
#ifdef HAVE_AT45DB

View File

@ -61,7 +61,8 @@ struct spi_dev_s *g_spi2;
* Name: stm32l4_spiregister
*
* Description:
* Called to register spi character driver of initialized spi device for the Nucleo-L432KC board.
* Called to register spi character driver of
* initialized spi device for the Nucleo-L432KC board.
*
****************************************************************************/
@ -70,16 +71,17 @@ void stm32l4_spiregister(void)
#ifdef CONFIG_STM32L4_SPI1
int ret = spi_register(g_spi1, 1);
if (ret < 0)
{
spierr("ERROR: FAILED to register driver of SPI port 1\n");
}
{
spierr("ERROR: FAILED to register driver of SPI port 1\n");
}
#endif
#ifdef CONFIG_STM32L4_SPI2
int ret = spi_register(g_spi2, 2);
if (ret < 0)
{
spierr("ERROR: FAILED to register driver of SPI port 2\n");
}
{
spierr("ERROR: FAILED to register driver of SPI port 2\n");
}
#endif
}