aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-30 12:55:50 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-30 12:55:50 +0000
commit5ff9f39050d5bd8e64ed00eb6ba198882d8cfc15 (patch)
tree89b6f9f4f1c100122f7a03632c44aa04dfbc5e24 /os
parenta88c4972cf426c9c57fd246b3bacdb1e919b7ebd (diff)
downloadChibiOS-5ff9f39050d5bd8e64ed00eb6ba198882d8cfc15.tar.gz
ChibiOS-5ff9f39050d5bd8e64ed00eb6ba198882d8cfc15.tar.bz2
ChibiOS-5ff9f39050d5bd8e64ed00eb6ba198882d8cfc15.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2097 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/platforms/STM32/uart_lld.c10
1 files changed, 6 insertions, 4 deletions
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);
}
/**