From e2448aac991fff9bc29d892de9d78c6d1714e81c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 15 Jan 2012 09:37:27 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3811 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/i2c_lld.c | 6 ------ os/hal/platforms/STM32/spi_lld.c | 4 +--- os/hal/platforms/STM32/uart_lld.c | 5 ----- 3 files changed, 1 insertion(+), 14 deletions(-) (limited to 'os/hal/platforms/STM32') diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c index 1e96c922c..b947dd579 100644 --- a/os/hal/platforms/STM32/i2c_lld.c +++ b/os/hal/platforms/STM32/i2c_lld.c @@ -153,8 +153,6 @@ static void i2c_lld_abort_operation(I2CDriver *i2cp) { /* Stops the associated DMA streams.*/ dmaStreamDisable(i2cp->dmatx); dmaStreamDisable(i2cp->dmarx); - dmaStreamClearInterrupt(i2cp->dmatx); - dmaStreamClearInterrupt(i2cp->dmarx); } /** @@ -362,7 +360,6 @@ static void i2c_lld_serve_rx_end_irq(I2CDriver *i2cp, uint32_t flags) { #endif dmaStreamDisable(i2cp->dmarx); - dmaStreamClearInterrupt(i2cp->dmarx); dp->CR2 &= ~I2C_CR2_LAST; dp->CR1 &= ~I2C_CR1_ACK; @@ -390,7 +387,6 @@ static void i2c_lld_serve_tx_end_irq(I2CDriver *i2cp, uint32_t flags) { #endif dmaStreamDisable(i2cp->dmatx); - dmaStreamClearInterrupt(i2cp->dmatx); /* Enables interrupts to catch BTF event meaning transmission part complete. Interrupt handler will decide to generate STOP or to begin receiving part of R/W transaction itself.*/ @@ -412,8 +408,6 @@ static void i2c_lld_serve_error_interrupt(I2CDriver *i2cp) { chSysLockFromIsr(); dmaStreamDisable(i2cp->dmatx); dmaStreamDisable(i2cp->dmarx); - dmaStreamClearInterrupt(i2cp->dmatx); - dmaStreamClearInterrupt(i2cp->dmarx); chSysUnlockFromIsr(); errors = I2CD_NO_ERROR; diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c index c98d762b3..1e9c69100 100644 --- a/os/hal/platforms/STM32/spi_lld.c +++ b/os/hal/platforms/STM32/spi_lld.c @@ -106,11 +106,9 @@ static void spi_lld_serve_rx_interrupt(SPIDriver *spip, uint32_t flags) { (void)flags; #endif - /* Stop everything. The status of the TX DMA is cleared here because its - handler is only invoked in case of error.*/ + /* Stop everything.*/ dmaStreamDisable(spip->dmatx); dmaStreamDisable(spip->dmarx); - dmaStreamClearInterrupt(spip->dmatx); /* Portable SPI ISR code defined in the high level driver, note, it is a macro.*/ diff --git a/os/hal/platforms/STM32/uart_lld.c b/os/hal/platforms/STM32/uart_lld.c index a9be379af..1c377273b 100644 --- a/os/hal/platforms/STM32/uart_lld.c +++ b/os/hal/platforms/STM32/uart_lld.c @@ -139,9 +139,7 @@ static void usart_stop(UARTDriver *uartp) { /* Stops RX and TX DMA channels.*/ dmaStreamDisable(uartp->dmarx); - dmaStreamClearInterrupt(uartp->dmarx); dmaStreamDisable(uartp->dmatx); - dmaStreamClearInterrupt(uartp->dmatx); /* Stops USART operations.*/ uartp->usart->CR1 = 0; @@ -534,7 +532,6 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) { size_t uart_lld_stop_send(UARTDriver *uartp) { dmaStreamDisable(uartp->dmatx); - dmaStreamClearInterrupt(uartp->dmatx); return dmaStreamGetTransactionSize(uartp->dmatx); } @@ -553,7 +550,6 @@ void uart_lld_start_receive(UARTDriver *uartp, size_t n, void *rxbuf) { /* Stopping previous activity (idle state).*/ dmaStreamDisable(uartp->dmarx); - dmaStreamClearInterrupt(uartp->dmarx); /* RX DMA channel preparation and start.*/ dmaStreamSetMemory0(uartp->dmarx, rxbuf); @@ -578,7 +574,6 @@ size_t uart_lld_stop_receive(UARTDriver *uartp) { size_t n; dmaStreamDisable(uartp->dmarx); - dmaStreamClearInterrupt(uartp->dmarx); n = dmaStreamGetTransactionSize(uartp->dmarx); set_rx_idle_loop(uartp); return n; -- cgit v1.2.3