diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-15 14:47:18 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-09-15 14:47:18 +0000 |
commit | fe2fb8757056efa555ed77277de1cc207bb01baa (patch) | |
tree | d7990973a9a92eac0f98e50690f2af3d98f1ad1c /os | |
parent | ad5ce47a747f8a41341fa869607588584a284631 (diff) | |
download | ChibiOS-fe2fb8757056efa555ed77277de1cc207bb01baa.tar.gz ChibiOS-fe2fb8757056efa555ed77277de1cc207bb01baa.tar.bz2 ChibiOS-fe2fb8757056efa555ed77277de1cc207bb01baa.zip |
SPI files for L4+, to be continued.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12264 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h | 11 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx+/hal_lld.h | 2 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx+/platform.mk | 1 |
3 files changed, 13 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h index fdec76bfe..6c3fd36a6 100644 --- a/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h +++ b/os/hal/ports/STM32/LLD/DMAv1/stm32_dma.h @@ -78,6 +78,17 @@ #define STM32_DMA_IS_VALID_PRIORITY(prio) (((prio) >= 0U) && ((prio) <= 3U))
/**
+ * @brief Checks if a DMA channel is within the valid range.
+ *
+ * @param[in] ch DMA channel
+ * @retval The check result.
+ * @retval FALSE invalid DMA channel.
+ * @retval TRUE correct DMA channel.
+ */
+#define STM32_DMA_IS_VALID_CHANNEL(ch) (((ch) >= 0U) && \
+ ((ch) < STM32_DMA_STREAMS))
+
+/**
* @brief Returns an unique numeric identifier for a DMA stream.
*
* @param[in] dma the DMA unit number
diff --git a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h index d274d58f2..afc4f5692 100644 --- a/os/hal/ports/STM32/STM32L4xx+/hal_lld.h +++ b/os/hal/ports/STM32/STM32L4xx+/hal_lld.h @@ -2276,7 +2276,7 @@ #include "cache.h"
#include "mpu_v7m.h"
#include "stm32_isr.h"
-//#include "stm32_dma.h"
+#include "stm32_dma.h"
#include "stm32_rcc.h"
#ifdef __cplusplus
diff --git a/os/hal/ports/STM32/STM32L4xx+/platform.mk b/os/hal/ports/STM32/STM32L4xx+/platform.mk index fc2d9094d..4af973722 100644 --- a/os/hal/ports/STM32/STM32L4xx+/platform.mk +++ b/os/hal/ports/STM32/STM32L4xx+/platform.mk @@ -25,6 +25,7 @@ include $(CHIBIOS)/os/hal/ports/STM32/LLD/CANv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/GPIOv3/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/RTCv2/driver.mk
+include $(CHIBIOS)/os/hal/ports/STM32/LLD/SPIv3/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/TIMv1/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/USARTv2/driver.mk
include $(CHIBIOS)/os/hal/ports/STM32/LLD/xWDGv1/driver.mk
|