diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-05-15 07:32:58 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2018-05-15 07:32:58 +0000 |
commit | 9084b56be9e94b8bfe2c3cfb602d0404943a60d0 (patch) | |
tree | 4b4a2641ca559c3854c08351e23185e305b311b1 /os/hal/ports/STM32 | |
parent | 30cd967c172dbdf442f6777f83f647b3d525261b (diff) | |
download | ChibiOS-9084b56be9e94b8bfe2c3cfb602d0404943a60d0.tar.gz ChibiOS-9084b56be9e94b8bfe2c3cfb602d0404943a60d0.tar.bz2 ChibiOS-9084b56be9e94b8bfe2c3cfb602d0404943a60d0.zip |
Various fixes to F413 mcuconf and registry. Removed dead options in OTGv1.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12036 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/ports/STM32')
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h | 10 | ||||
-rw-r--r-- | os/hal/ports/STM32/STM32F4xx/stm32_registry.h | 12 |
2 files changed, 14 insertions, 8 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h index 7ec858ee7..addfd9858 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.h @@ -145,8 +145,8 @@ /**
* @brief Host wake-up procedure duration.
*/
-#if !defined(USB_HOST_WAKEUP_DURATION) || defined(__DOXYGEN__)
-#define USB_HOST_WAKEUP_DURATION 2
+#if !defined(STM32_USB_HOST_WAKEUP_DURATION) || defined(__DOXYGEN__)
+#define STM32_USB_HOST_WAKEUP_DURATION 2
#endif
/*===========================================================================*/
@@ -259,8 +259,8 @@ #error "the USB OTG driver requires a 48MHz clock"
#endif
-#if (USB_HOST_WAKEUP_DURATION < 2) || (USB_HOST_WAKEUP_DURATION > 15)
-#error "invalid USB_HOST_WAKEUP_DURATION setting, it must be between 2 and 15"
+#if (STM32_USB_HOST_WAKEUP_DURATION < 2) || (STM32_USB_HOST_WAKEUP_DURATION > 15)
+#error "invalid STM32_USB_HOST_WAKEUP_DURATION setting, it must be between 2 and 15"
#endif
/*===========================================================================*/
@@ -591,7 +591,7 @@ struct USBDriver { #define usb_lld_wakeup_host(usbp) \
do{ \
(usbp)->otg->DCTL |= DCTL_RWUSIG; \
- osalThreadSleepMilliseconds(USB_HOST_WAKEUP_DURATION); \
+ osalThreadSleepMilliseconds(STM32_USB_HOST_WAKEUP_DURATION); \
(usbp)->otg->DCTL &= ~DCTL_RWUSIG; \
} while (false)
diff --git a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h index 4c1d9b5e7..fe7ce9bb9 100644 --- a/os/hal/ports/STM32/STM32F4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F4xx/stm32_registry.h @@ -1235,12 +1235,18 @@ /* CAN attributes.*/
#define STM32_HAS_CAN1 TRUE
#define STM32_HAS_CAN2 TRUE
-#define STM32_HAS_CAN3 FALSE
+#define STM32_HAS_CAN3 TRUE
#define STM32_CAN_MAX_FILTERS 28
/* DAC attributes.*/
-#define STM32_HAS_DAC1_CH1 FALSE
-#define STM32_HAS_DAC1_CH2 FALSE
+#define STM32_HAS_DAC1_CH1 TRUE
+#define STM32_DAC1_CH1_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5))
+#define STM32_DAC1_CH1_DMA_CHN 0x00700000
+
+#define STM32_HAS_DAC1_CH2 TRUE
+#define STM32_DAC1_CH2_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 6))
+#define STM32_DAC1_CH2_DMA_CHN 0x07000000
+
#define STM32_HAS_DAC2_CH1 FALSE
#define STM32_HAS_DAC2_CH2 FALSE
|