From 5ff9f39050d5bd8e64ed00eb6ba198882d8cfc15 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 30 Jul 2010 12:55:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2097 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/uart_lld.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'os') diff --git a/os/hal/platforms/STM32/uart_lld.c b/os/hal/platforms/STM32/uart_lld.c index 8b9330fdc..7f55fabb0 100644 --- a/os/hal/platforms/STM32/uart_lld.c +++ b/os/hal/platforms/STM32/uart_lld.c @@ -371,9 +371,10 @@ void uart_lld_stop(UARTDriver *uartp) { */ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) { - (void)uartp; - (void)n; - (void)txbuf; + /* TX DMA channel preparation and start.*/ + dmaSetupChannel(uartp->ud_dmap, uartp->ud_dmatx, n, &uartp->ud_txbuf, + uartp->ud_dmaccr | DMA_CCR1_TEIE | DMA_CCR1_TCIE); + dmaEnableChannel(uartp->ud_dmap, uartp->ud_dmatx); } /** @@ -384,7 +385,8 @@ void uart_lld_start_send(UARTDriver *uartp, size_t n, const void *txbuf) { */ void uart_lld_stop_send(UARTDriver *uartp) { - (void)uartp; + dmaDisableChannel(uartp->ud_dmap, uartp->ud_dmatx); + dmaClearChannel(uartp->ud_dmap, uartp->ud_dmatx); } /** -- cgit v1.2.3