mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-24 01:09:47 +08:00
[error code][-RT_EIO] fix that use RT_EIO without -
This commit is contained in:
committed by
Man, Jianting (Meco)
parent
334c609c6c
commit
2cc9bd876e
@@ -212,7 +212,7 @@ static rt_err_t hc32_spi_init(struct hc32_spi *spi_drv, struct rt_spi_configurat
|
||||
}
|
||||
else
|
||||
{
|
||||
return RT_EIO;
|
||||
return -RT_EIO;
|
||||
}
|
||||
/* Get BUS clock */
|
||||
CLK_GetClockFreq(&stcClkFreq);
|
||||
@@ -258,7 +258,7 @@ static rt_err_t hc32_spi_init(struct hc32_spi *spi_drv, struct rt_spi_configurat
|
||||
rt_hw_spi_board_init(spi_instance);
|
||||
if (LL_OK != SPI_Init(spi_instance, &stcSpiInit))
|
||||
{
|
||||
return RT_EIO;
|
||||
return -RT_EIO;
|
||||
}
|
||||
|
||||
/* DMA configuration */
|
||||
@@ -296,7 +296,7 @@ static rt_err_t hc32_spi_init(struct hc32_spi *spi_drv, struct rt_spi_configurat
|
||||
/* Init Dma */
|
||||
if (LL_OK != DMA_Init(spi_dma->Instance, spi_dma->channel, &stcDmaInit))
|
||||
{
|
||||
return RT_EIO;
|
||||
return -RT_EIO;
|
||||
}
|
||||
NVIC_EnableIRQ(spi_dma->irq_config.irq_num);
|
||||
/* Enable Dma */
|
||||
@@ -335,7 +335,7 @@ static rt_err_t hc32_spi_init(struct hc32_spi *spi_drv, struct rt_spi_configurat
|
||||
/* Init Dma */
|
||||
if (LL_OK != DMA_Init(spi_dma->Instance, spi_dma->channel, &stcDmaInit))
|
||||
{
|
||||
return RT_EIO;
|
||||
return -RT_EIO;
|
||||
}
|
||||
NVIC_EnableIRQ(spi_dma->irq_config.irq_num);
|
||||
/* Enable Dma */
|
||||
|
||||
Reference in New Issue
Block a user