summaryrefslogtreecommitdiffstats
path: root/bsps/arm/atsam/include/bsp.h
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2022-01-13 08:38:07 +0100
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2022-01-18 08:41:15 +0100
commitaa95122c17707d6eaadcbdae71aad33446fcf66c (patch)
tree00cc64ca39cf06fb3e74e159c3280fe41139417a /bsps/arm/atsam/include/bsp.h
parentbsp/atsam: Merge USART and UART driver (diff)
downloadrtems-aa95122c17707d6eaadcbdae71aad33446fcf66c.tar.bz2
bsp/atsam: Optionally use DMA for UART Rx
If the system is busy with other interrupts and the UART is set to a fast baud rate, it's possible to loose UART interrupts and therefore characters. This allows to optionally enable a DMA for the UARTs so that a number of lost interrupts can be tolerated. The number of DMAs on this chip is limited and not not all applications need that feature. Therefore the DMA is disabled by default. Close #4578
Diffstat (limited to 'bsps/arm/atsam/include/bsp.h')
-rw-r--r--bsps/arm/atsam/include/bsp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/bsps/arm/atsam/include/bsp.h b/bsps/arm/atsam/include/bsp.h
index 2556f6046d..d1b021255c 100644
--- a/bsps/arm/atsam/include/bsp.h
+++ b/bsps/arm/atsam/include/bsp.h
@@ -33,6 +33,7 @@
#include <bspopts.h>
#include <bsp/default-initial-extension.h>
+#include <sys/ioccom.h>
#include <rtems.h>
@@ -109,6 +110,18 @@ void atsam_rtc_get_time(rtems_time_of_day *tod);
void bsp_restart( const void *const addr );
+/*
+ * This ioctl enables the receive DMA for an UART. The DMA can be usefull if you
+ * loose characters in high interrupt load situations.
+ *
+ * Disabling the DMA again is only possible by closing all file descriptors of
+ * that UART.
+ *
+ * Note that every UART needs one DMA channel and the system has only a limited
+ * amount of DMAs. So only use it if you need it.
+ */
+#define ATSAM_UART_ENABLE_RX_DMA _IO('d', 0)
+
#ifdef __cplusplus
}
#endif /* __cplusplus */