Skip to content

Commit

Permalink
Merge pull request RT-Thread#790 from TanekLiang/stm32f1l07-c99
Browse files Browse the repository at this point in the history
[Bsp] update stm32f107 spi driver
  • Loading branch information
BernardXiong authored Aug 6, 2017
2 parents 6a08e15 + 6eac07c commit 25d415a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bsp/stm32f107/drivers/rt_stm32f10x_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void DMA1_Channel4_IRQHandler(void) {
/* enter interrupt */
rt_interrupt_enter();
rt_event_send(&dma2.event, SPI_DMA_TX_DONE);
DMA_ClearFlag(dma2.tx_gl_flag);
DMA_ClearFlag(dma2.priv_data->tx_gl_flag);
/* leave interrupt */
rt_interrupt_leave();
}
Expand Down Expand Up @@ -418,9 +418,12 @@ rt_err_t stm32_spi_register(SPI_TypeDef * SPI,
const char * spi_bus_name)
{
rt_err_t res = RT_EOK;
#ifdef SPI_USE_DMA
NVIC_InitTypeDef NVIC_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);
#endif
rt_uint32_t flags = 0;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE);

if(SPI == SPI1)
{
stm32_spi->SPI = SPI1;
Expand Down

0 comments on commit 25d415a

Please sign in to comment.